[GRASS-dev] Re: [GRASS-stats] Sys.setlocale for GRASS6.4

Markus Neteler neteler at osgeo.org
Fri Sep 4 16:38:33 EDT 2009


On Fri, Sep 4, 2009 at 9:26 PM, Glynn Clements<glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>> @grass-dev: There are encoding issues with --interface-description
>>    which states UTF-8 also then the actual language encoding is different:

[then -> when]

...
> The --interface description option needs to either determine the
> locale's encoding via e.g. nl_langinfo() and use that in the header,

It seems to be already there?

lib/gis/parser.c:

static void G_usage_xml(void)
{
...
#if defined(HAVE_LANGINFO_H)
    encoding = nl_langinfo(CODESET);
    if (!encoding || strlen(encoding) == 0) {
        encoding = "UTF-8";
    }
#else
    encoding = "UTF-8";
#endif
...
    fprintf(stdout, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", encoding);
    fprintf(stdout, "<!DOCTYPE task SYSTEM \"grass-interface.dtd\">\n");

Apparently the Windows built was missing HAVE_LANGINFO_H or it
isn't properly set on Windows.

?
Markus


More information about the grass-dev mailing list