Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » encoding of command line arguments
encoding of command line arguments [message #1528] Tue, 07 March 2006 23:35 Go to next message
zsolt is currently offline  zsolt
Messages: 698
Registered: December 2005
Location: Budapest, Hungary
Contributor
CommandLine() function returns a Vector with command line arguments in system enconing. Other parts of U++ uses UTF-8.
Maybe it could be a good idea to convert encoding in SplitCmdLine__() function.
Currently, I'm using a workaround like:
FromSystemCharset(cmd[i])
Re: encoding of command line arguments [message #1532 is a reply to message #1528] Wed, 08 March 2006 09:04 Go to previous messageGo to next message
mirek is currently online  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
zsolt wrote on Tue, 07 March 2006 17:35

CommandLine() function returns a Vector with command line arguments in system enconing. Other parts of U++ uses UTF-8.
Maybe it could be a good idea to convert encoding in SplitCmdLine__() function.
Currently, I'm using a workaround like:
FromSystemCharset(cmd[i])


I guess you are right...

BTW, it is not limited to UTF-8 - that is just the default setting (curiously, not the one we are using in many of our production apps because of historical reasons). You can set it to any encoding you need using SetDefaultCharset.

Mirek
Re: encoding of command line arguments [message #1642 is a reply to message #1532] Sat, 11 March 2006 09:08 Go to previous message
mirek is currently online  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
luzr wrote on Wed, 08 March 2006 03:04

zsolt wrote on Tue, 07 March 2006 17:35

CommandLine() function returns a Vector with command line arguments in system enconing. Other parts of U++ uses UTF-8.
Maybe it could be a good idea to convert encoding in SplitCmdLine__() function.
Currently, I'm using a workaround like:
FromSystemCharset(cmd[i])


I guess you are right...

BTW, it is not limited to UTF-8 - that is just the default setting (curiously, not the one we are using in many of our production apps because of historical reasons). You can set it to any encoding you need using SetDefaultCharset.

Mirek


After further investigation, I ruled against this, at least for the moment - it is quite unclear when that conversion should happen to keep it safe (a sort of interface shortcoming).

Mirek
Previous Topic: French translation of Core and CtrlLib
Next Topic: Core defs.h double definintion [BUG][FIXED]
Goto Forum:
  


Current Time: Sun May 05 10:20:10 CEST 2024

Total time taken to generate the page: 0.02916 seconds