[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] bindtextdomain with non ASCII directory name on window

From: Bruno Haible
Subject: Re: [bug-gettext] bindtextdomain with non ASCII directory name on windows
Date: Fri, 09 Jun 2017 20:49:08 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-79-generic; KDE/5.18.0; x86_64; ; )


> Is there a way to set the base directory on Windows (mingw-w64) if the
> directory name contains non ASCII characters.
> char * bindtextdomain (const char * domainname, const char * dirname);
> the function takes a const char* dirname

On native Windows, 'char *' strings are encoded using the so-called
"ANSI code page", which depends on the system locale (windows-1252 in
Western Europe, for example).

The charset conversion functions of Windows support 65001 as an alias
for UTF-8, but there is no locale which would have this encoding.

> On Windows, the OS does not work with UTF-8 strings so that I guess
> it would not work.

Correct. 'char *' strings in Windows API functions are almost never UTF-8

> What can I do?

You can use Cygwin. Cygwin nowadays uses UTF-8 as 'char *' encoding for
all locales.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]