Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] UTF8 vs. locale in error messages (bug 5715)

From: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
Date: Tue, 28 Jun 2011 23:19:06 +0200
On Tue, Jun 28, 2011 at 9:37 PM, Guy Harris <guy@xxxxxxxxxxxx> wrote:
> However, if LANG is blank, you presumably don't have Terminal set up to "Set local enviornment variables on startup" (Preferences > Settings > Advanced, at the bottom);

Actually I have "Set local environment variables on startup" checked.
I also have "Character encoding: Unicode (UTF-8)".
I use English as my preferred language and Norway as region.

> Just out of curiosity, if you set that (or if you explicitly set LANG to something appropriate ending in ".UTF-8", whether it's no_NO.UTF-8, nn_NO.UTF-8, nb_NO.UTF-8, en_NO.UTF-8, or some other setting), does that make the GUI problem go away with a version of Wireshark *without* the
>
>        http://anonsvn.wireshark.org/viewvc?revision=37812&view=revision
>
> changes?

Normally I run Wireshark.app generated from 'make osx-install', and
getenv("LANG") returns ".UTF-8".  No luck with rev < 37812.

When running from command line with LANG=no_NO.UTF-8 I get this:
(process:65298): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.

, but I get a correct error message with rev < 37812 and "æøå.pcap" or
"Проверка.pcap" as filename.

So; if I run with a UTF-8 locale the g_locale_to_utf8() will not do
any conversion, and when running with a locale without UTF-8 (or not
legal) we get the error in bug 5715.

The bug was reported for Windows, but I don't know how it works there.
 I have tested on OSX and Ubuntu Linux.


Maybe we should include the locale in our about box?
We may use it in bug reports.


-- 
Stig Bjørlykke