[mapguide-trac] #519: Mgserver.exe chrashes when ", " is used as decimal separator in locale

MapGuide Open Source trac_mapguide at osgeo.org
Thu Mar 27 18:00:19 EDT 2008


#519: Mgserver.exe chrashes when "," is used as decimal separator in locale
---------------------+------------------------------------------------------
 Reporter:  trondat  |         Owner:  tonyfang
     Type:  defect   |        Status:  new     
 Priority:  medium   |     Milestone:          
Component:  Server   |       Version:  2.0.0   
 Severity:  major    |    Resolution:          
 Keywords:           |   External_id:          
---------------------+------------------------------------------------------
Comment (by tonyfang):

 The problem is actually with the locale name "Norwegian
 (Bokmål)_Norway.1252" and NOT the "," decimal separator.

 In Windows, when ::setLocale is called, it is returning the name of the
 locale, "Norwegian (Bokmål)_Norway.1252", as a code-paged multi-byte
 string. However, MapGuide expects the string to be in UTF-8. Thus when it
 tries to convert it to a wide-string using a UTF8-to-UTF16 conversion
 method, it throws an exception -- which crashes the server.

 Since we aren't doing anything meaningful with that locale string anyways
 (we're just outputting it in a debug message), we can simply remove the
 code which attempts to convert that string to a wide-string.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/519#comment:2>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list