[mapguide-internals] Mapguide 2.2 beta on Linux fails to setup
locale from system
Trevor Wekel
trevor_wekel at otxsystems.com
Wed Jun 16 13:13:41 EDT 2010
Hi Gabriele,
I took a quick look at the code and it should be setting the locale based on the LANG environment variable. If LANG=en_US.UTF-8 then the MapGuide server should be using a UTF-8 character set. The "C" setlocale will also look for LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, and LC_TIME before trying LANG. If they are defined in the environment, it may be changing behaviour.
Please open a defect if the information above does not help.
Regards,
Trevor
-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Gabriele Monfardini
Sent: June 16, 2010 5:18 AM
To: MapGuide Internals Mail List
Subject: [mapguide-internals] Mapguide 2.2 beta on Linux fails to setup locale from system
SO: Centos 5.5
system locale: en-US.UTF-8
locale from serverconfig.ini: empty (from comment should default to
system locale)
provider: OGRProvider with libgdal rebuilt with Postgresql support.
viewer: plain Ajax
Postgresql locale: UTF-8
I have a layer which stylization involves a rule that check if a field
is equals to a string containing a 'à'
Obtained results:
* that rule fails
* every time that the rule is evaluated one apache thread dies with
this message in the error_log:
terminate called after throwing an instance of 'MgInvalidArgumentException*'
[notice] child pid 32615 exit signal Aborted (6)
(no messages on server Error.log even if loglevel is 3 on all
services, and also this is not so good)
- Changing the rule to plain 'a' does not solve the error, thus the
problem is in fetching the data from the db
- Changing the rule to plain 'a' and changing the row in the db does
solve the error (layer is correctly stylized and no more messages in
the error_log)
Reverting back to 'à' both in the db and in the rules and setting
"locale = en-US.UTF-8" in serverconfig.ini does solve the problem.
Thus I suppose that mapguide is using an incorrect locale (maybe
ISO8859-1 instead of UTF-8) and complains about finding invalid
characters.
This is a regression, since with Mapguide 2.1 (compiled on Debian) and
the same data all works correctly.
Should I open a bug?
Gabriele
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
More information about the mapguide-internals
mailing list