bug-gettext
[Top][All Lists]
Advanced

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

Re: Gettext Mac GUI application returning wrong characters


From: Bruno Haible
Subject: Re: Gettext Mac GUI application returning wrong characters
Date: Fri, 10 Jul 2020 23:23:44 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; )

Hello Gonzalo,

> I have an application that uses gettext / libintl for translation (to 
> Spanish).  It works fine on Linux.  On macOS Catalina 10.15.5, however, it 
> only works fine when the application is started command-line.  If the 
> application is started from the Finder or from the Applications directory, 
> the text is translated to Spanish, but the non ASCII characters are sent as 
> two characters, like ~n or ´o.
> My environment is Spanish.  

I cannot reproduce this with a sample program (attached) that writes some text
to a file. Whether started from the 'Terminal' or from the 'Finder', the text
that it writes to the file is in German, with umlaut.

> $ locale
> LANG=""
> LC_COLLATE="C"
> LC_CTYPE="UTF-8"
> LC_MESSAGES="C"
> LC_MONETARY="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_ALL=

This is normal. The 'Terminal' does not reflect the language preferences
through environment variables. libintl uses the CoreFoundation API to get
the language preferences.

Can you please adapt the attached test case in a way that reproduces the
behaviour you are seeing? Or otherwise provide a simple test case that
I could try?

If you can't do that, it would be good if you could print the values of
  getenv ("LANG")
  getenv ("LC_CTYPE")
  getenv ("LC_ALL")
  getenv ("OUTPUT_CHARSET")
from your program.

Bruno

Attachment: hello-c-0.tar.gz
Description: application/compressed-tar


reply via email to

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