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 » [BUG] CommandLine() returns non-unicode arguments
[BUG] CommandLine() returns non-unicode arguments [message #15238] Fri, 11 April 2008 10:05 Go to previous message
exhu is currently offline  exhu
Messages: 12
Registered: April 2008
Location: Belarus
Promising Member
Tested with 2007.1 win, MSVC 2005, WinXP SP2.

UPDATE: use windows console with Lucida Console font (that which is unicode-aware).

run as:
"mycon.exe schußbändig"

result:
"shu?bandig"

(the string is to contain umlauts or other symbols not in current ANSI encoding, try russian letters etc. if your current code page in WinXP contains umlauts).


Program source:

#include <iostream>

CONSOLE_APP_MAIN
{
	const Vector<String> & cmdline = CommandLine();
	
	for(Vector<String>::ConstIterator i = cmdline.Begin();i != cmdline.End();++i) {
		std::cout << (*i).Begin() << std::endl;
	}
}


NOTE: cout actually is not a proper class to use here, but if the U++ uses wide char win32 api then the produced string would be utf-8 or so and not the word with question mark and simply "a" instead of "a umlaut"...

[Updated on: Fri, 11 April 2008 10:07]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Convert upp Font size to LOGFONT size
Next Topic: Time should contain msecs too
Goto Forum:
  


Current Time: Mon May 13 23:58:23 CEST 2024

Total time taken to generate the page: 0.03539 seconds