[GRASS-dev] mkhtml fails on Windows with UnicodeDecodeError

Vaclav Petras wenzeslaus at gmail.com
Wed Aug 24 01:40:53 PDT 2022


Hi Martin,

On Wed, 24 Aug 2022 at 04:25, Martin Landa <landa.martin at gmail.com> wrote:

>
> the question is also why we are using default OS encoding to decode HTML
> pages [1]. Couldn't we simply use UTF-8 regardless of OS system locale?
>

This seems to be some general confusion around that, or more likely just
some legacy code.

The lib/gis/parser_html.c puts iso-8859-1 into the HTML files (I just
checked that now), so that's what an HTML reader should be using. That's of
course not what we want at this point. It just should be UTF-8 everywhere.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

The HTML files may already use UTF-8 (?), but the parser may emit HTML in
system-dependent encoding. However, the source code it is using should be
UTF-8 or more likely it is simply ASCII, so perhaps not much to worry about.

Vaclav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20220824/af560079/attachment.htm>


More information about the grass-dev mailing list