Opened 18 years ago

Closed 15 years ago

#80 closed defect (wontfix)

WideCharToMultiByte not respecting regional settings?

Reported by: jbirch Owned by:
Priority: medium Milestone:
Component: General Version: 1.2.0
Severity: major Keywords:
Cc: External ID: 929605

Description

This was just reported on the mailing list:

 I found finally what the problem is and the solution.
 
 Exception was raised when trying to set the scale bar in the print layout.
 
 It's all about Regional Settings. My computer has default French regional settings applied and the group symbol is set to blank. So, a scale number like 98765 is converted as 98 765. Because of this MgUtil.WideCharToMultiByte try to do conversion and fails.
 
 Changing this parameter (set ',' instead of blank) allows print correctly.
 
 Paco.
 
 
 Paco Alvarez wrote:
 > 
 > Hi all,
 > 
 > I'm trying to print using the print layout with DWF viewer.
 > The layout is the default one generated by the Studio and validated.
 > 
 > When I try print preview I get an error : 559 
 > MgInvalidArgumentException From the log file I find this :
 > 
 >  Error: Invalid argument(s):
 >         	[1] = "const string&"
 >         The string is invalid and cannot be converted.
 >  StackTrace:
 >   - MgMappingServiceHandler.ProcessOperation line 81 file 
 > c:\build_bond_area\mapguide_open_source\build_3.1\mgdev\server\src\services\mapping\MappingServiceHandler.cpp
 >   - MgOpGeneratePlot.Execute line 182 file 
 > c:\build_bond_area\mapguide_open_source\build_3.1\mgdev\server\src\services\mapping\OpGeneratePlot.cpp
 >   - MgServerMappingService.GeneratePlot line 831 file 
 > c:\build_bond_area\mapguide_open_source\build_3.1\mgdev\server\src\services\mapping\ServerMappingService.cpp
 >   - MgServerMappingService.GenerateMultiPlot line 1230 file 
 > c:\build_bond_area\mapguide_open_source\build_3.1\mgdev\server\src\services\mapping\ServerMappingService.cpp
 >   - MgUtil.WideCharToMultiByte line 297 file .\System\Util.cpp	Invalid
 > argument(s):
 > 	[1] = "const string&"
 > The string is invalid and cannot be converted.
 > 
 > The Server version is : 1.1.0.301

Change History (3)

comment:1 by rexszeto, 18 years ago

External ID: 929605

comment:2 by mbeckman, 17 years ago

Version: 1.1.01.2.0

I get the same error in Version 1.2.0.1704 on a Swedish OS, but I can't fix it by changing the group separator into ','. The only thing that makes it possible for me to use printlayouts is to disable the scale bar.

Error: Invalid argument(s):

[1] = "const string&"

The string is invalid and cannot be converted.

StackTrace:

[1] = "const string&"

The string is invalid and cannot be converted.

comment:3 by jbirch, 15 years ago

Resolution: wontfix
Status: newclosed

Old ticket; closing. If still a concern, please retest at version 2.1 and re-open.

Note: See TracTickets for help on using tickets.