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 » Developing U++ » U++ Developers corner » Multi-byte character Compile Error
Multi-byte character Compile Error [message #24034] Sun, 20 December 2009 13:22 Go to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
If .cpp file contains the multi-byte character compile error will occur.For example to compile controls4u_demo occur:
Controls4U.cpp
C:\upp\bazaar\Controls4U\Controls4U.cpp : warning C4819: The file contains a character that cannot be represe
	nted in the current code page (936). Save the file in Unicode format to prevent data loss
C:\upp\bazaar\Controls4U\Controls4U.cpp(406) : error C2001: newline in constant
C:\upp\bazaar\Controls4U\Controls4U.cpp(407) : error C2143: syntax error : missing ')' before 'return'


My code:
GUI_APP_MAIN
{
	jishuwin a;
	a.Title("G´úÂëת»»Æ÷").Zoomable().Sizeable().Run();
	
}


compile error:
F:\MyApps\jishu\main.cpp : warning C4819: The file contains a character that cannot be represented in the cur
	rent code page (936). Save the file in Unicode format to prevent data loss
F:\MyApps\jishu\main.cpp(39) : error C2001: newline in constant
F:\MyApps\jishu\main.cpp(41) : error C2143: syntax error : missing ')' before '}'
F:\MyApps\jishu\main.cpp(41) : error C2143: syntax error : missing ';' before '}'
Re: Multi-byte character Compile Error [message #24035 is a reply to message #24034] Sun, 20 December 2009 13:41 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
gxl117 wrote on Sun, 20 December 2009 07:22

If .cpp file contains the multi-byte character compile error will occur.For example to compile controls4u_demo occur:
Controls4U.cpp
C:\upp\bazaar\Controls4U\Controls4U.cpp : warning C4819: The file contains a character that cannot be represe
	nted in the current code page (936). Save the file in Unicode format to prevent data loss
C:\upp\bazaar\Controls4U\Controls4U.cpp(406) : error C2001: newline in constant
C:\upp\bazaar\Controls4U\Controls4U.cpp(407) : error C2143: syntax error : missing ')' before 'return'


My code:
GUI_APP_MAIN
{
	jishuwin a;
	a.Title("G´úÂëת»»Æ÷").Zoomable().Sizeable().Run();
	
}


compile error:
F:\MyApps\jishu\main.cpp : warning C4819: The file contains a character that cannot be represented in the cur
	rent code page (936). Save the file in Unicode format to prevent data loss
F:\MyApps\jishu\main.cpp(39) : error C2001: newline in constant
F:\MyApps\jishu\main.cpp(41) : error C2143: syntax error : missing ')' before '}'
F:\MyApps\jishu\main.cpp(41) : error C2143: syntax error : missing ';' before '}'



Eh, still the same issue - Chinesse Windows Visual C++ does not permit UTF-8 strings. There does snot seem to be way around.

At least we have now introduced the fix for .t files. Means if you make your app English and provide translation, you are OK.

Mirek
Previous Topic: Porting U++ to Blackfin DSP
Next Topic: Compilation Under win 32 with MSC9 error
Goto Forum:
  


Current Time: Wed Apr 24 20:09:13 CEST 2024

Total time taken to generate the page: 0.01812 seconds