Bug#761629: Quick response from upstream!

Ross Gammon rossgammon at mail.dk
Thu Oct 2 17:27:12 UTC 2014

Received this today:

Hi Ross,

I'm currently unable to check this issue directly on Debian Unstable,
anyway I discovered in the meanwhile that the same identical problem
affects Debian Testing and Ubuntu 14.04: all them ships wxWidgets 3.0.x

the real cause of this bug is really puzzling: immediately after
selecting the Shapefile path the app will then attempt to identify
the appropriate platform charset name.
the actual code supporting this task is located on libspatialite
in -/src/gaiaaux/gg_utf8.c - gaiaGetLocaleCharset()
on every Linux this simply ends up in calling nl_langinfo(CODESET)

and here happens the puzzling issue: e.g. Fedora (wxGTK-2.8) will
return 'UTF-8' exactly as expected.

Ubuntu wxGTK-3.0 will return insead 'ANSI_X3.4-1968': AFAIK this
simply is an alias name for US-ASCII, anyway it's *not* defined in
the standard list of well-known charsets supported by spatialite_gui
(based on common iconv definitions) and this causes an invalid pointer
to be returned, thus finally causing the reported crash.

counter-check: I've just applied this brutal patch on Main.cpp
near line 280:

- LocaleCharset = wxString::FromUTF8(gaiaGetLocaleCharset());
+ LocaleCharset = wxT("UTF-8");

this seems to succesfully eradicate the crash (indirectly confirming
that the crash cause is to be identified in the crazy charset name
returned bu Ubuntu, and I strongly suspect from Debian as well).

I'm absolutely unaware if this odd issue is caused by Debian/Ubuntu
or by wxGTK-3.0.x; the ubunu shell apparently reports "UTF-8" as
the default charset currently used, and this focuses the strongest
suspects on wxGTK-3.0

surely to be investigated in more depth

bye Sandro

And then:

Hi Ross,

there is an interesting follow-up: googling around I've found this
old Debian ticket:


so it looks that on Debian (and Debian-derived such as Ubuntu)
"ANSI_X3.4-1968" is the expected default charset name until the
program explicitly asks to import all Locale definitions from
the environment.
after this the charset name will become "UTF-8" as usually expected.

accordingly to all this the most appropriate patch seems to be the
following one (to be placed on the very first line of the Main ctor):

   // main GUI frame constructor
+       setlocale(LC_ALL, "");

it's just a suspect of my own, but probably wxGTK-2.8 automatically
performed this task during its own initialization, whilst wxGTK-3.x

bye Sandro

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20141002/9e5b6e1d/attachment.sig>

More information about the Pkg-grass-devel mailing list