On Mon, 8 Jun 2015, "Juan C. Estévez" wrote:
On 08/06/2015 19:50, Allin Cottrell wrote:
> On Mon, 8 Jun 2015, Henrique Andrade wrote:
>> The problem remains :-(
> Well, I just tested on Windows 8, using a batch file to call gretlcli
> because I couldn't find any other way to force cmd.exe to run gretlcli in
> Portuguese. The diacritics came out right, as shown in the attachment.
Sorry if this is noise. May be a problem with the print command?
This happens with Allin´s test...
The OLS output is ok.
Strings produced by the "print" command don't go through the gettext
translation mechanism and so are not recoded automatically; in the
Windows console they will come out in whatever encoding was used on
I thought that perhaps the Windows function SetConsoleOutputCP() might
help, but I've now tested on Windows 8 and it doesn't. So at this
point you're on your own as regards non-ASCII characters in gretl's
print and printf. Doing "chcp 65001" in the Windows console might or
might not help.
If you google the issue of character encoding in the Windows console,
you'll see it's a total horror show. (Everyone but Microsoft has
settled on UTF-8 as the most efficient representation of the world's
languages. Windows can be induced to use UTF-8 if the wind is blowing
in the right direction and you hold your mouth right, but natively it
uses a mash-up of legacy 8-bit "code pages" along with the more
bloated representations of unicode.)