|
|
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » compiler's output message of vc10free Chinese edition
compiler's output message of vc10free Chinese edition [message #34025] |
Tue, 11 October 2011 07:40 |
LeiMing
Messages: 21 Registered: September 2009 Location: China
|
Promising Member |
|
|
old title (before edit):
UTF-8 Encoded src files and vc10free Chinese edition
Hello,
I'm using ultimate++ 3211 under windows 7 chinese, the compilers are visual c++ 2003 toolkit (compiler updated with the files extracted from vc2003 sp1) w/ win2003 psdk and visual c++ 2010 express sp1 w/ winsdk 7.0.
The application I'm working on has many strings written in Chinese. It works well with visual c++ 2003 toolkit compiler (english) but when turned to the vc10 chinese compiler, errors come out. The error messages are also shown in human-unreadable forms (it should be in chinese with native encoding like gbk, but I guess it's mis-decoded).
Quote: | C:\MyApps\test2\main.cpp(21) : error C2001:
C:\MyApps\test2\main.cpp(22) : error C2146: : ȱ)(w)
C:\MyApps\test2\main.cpp(23) : error C2143: : ȱ)(})
C:\MyApps\test2\main.cpp(23) : error C2143: : ȱ;())
|
maybe vc7.1 compiler and vc10 compiler work in different ways or vc compiler english and vc compiler chinese work in different ways to recognize the encoding of source code files.
after I tried converting the source code files into utf8 with bom from utf8 without bom, the compiler works. But when open it in theIDE, the very first character is abnormal.
So I wonder if it could be solved in next release version. now it works with source code encoded in utf8 without bom mark but vc10free chinese compiler doesn't support this (it requires the bom mark).
this is the one I wrote for test.
http://173.224.214.51/ftp/test2.7z
It works with vc7.1 english compiler but failed in vc10 chinese compiler
[Updated on: Tue, 05 February 2013 17:12] Report message to a moderator
|
|
|
Re: UTF-8 Encoded src files and vc10free Chinese edition [message #34048 is a reply to message #34025] |
Thu, 13 October 2011 20:24 |
|
mirek
Messages: 14039 Registered: November 2005
|
Ultimate Member |
|
|
LeiMing wrote on Tue, 11 October 2011 01:40 | Hello,
I'm using ultimate++ 3211 under windows 7 chinese, the compilers are visual c++ 2003 toolkit (compiler updated with the files extracted from vc2003 sp1) w/ win2003 psdk and visual c++ 2010 express sp1 w/ winsdk 7.0.
The application I'm working on has many strings written in Chinese. It works well with visual c++ 2003 toolkit compiler (english) but when turned to the vc10 chinese compiler, errors come out. The error messages are also shown in human-unreadable forms (it should be in chinese with native encoding like gbk, but I guess it's mis-decoded).
Quote: | C:\MyApps\test2\main.cpp(21) : error C2001:
C:\MyApps\test2\main.cpp(22) : error C2146: : ȱ)(w)
C:\MyApps\test2\main.cpp(23) : error C2143: : ȱ)(})
C:\MyApps\test2\main.cpp(23) : error C2143: : ȱ;())
|
maybe vc7.1 compiler and vc10 compiler work in different ways or vc compiler english and vc compiler chinese work in different ways to recognize the encoding of source code files.
after I tried converting the source code files into utf8 with bom from utf8 without bom, the compiler works. But when open it in theIDE, the very first character is abnormal.
So I wonder if it could be solved in next release version. now it works with source code encoded in utf8 without bom mark but vc10free chinese compiler doesn't support this (it requires the bom mark).
this is the one I wrote for test.
http://173.224.214.51/ftp/test2.7z
It works with vc7.1 english compiler but failed in vc10 chinese compiler
|
Well, this is an issue we are fighting with for some time now.
We have solved it as long as you are using i18n system of U++.
Finding that BOM fixes the issue as well is a good find and I guess we should consider this for the next release.
Anyway, one thing I am afraid about is how other compilers would react to BOM? What does GCC say about it? (We now unfortunately included Watcom builder as well - how does it react to BOM?).
Mirek
|
|
|
|
|
Re: UTF-8 Encoded src files and vc10free Chinese edition [message #34062 is a reply to message #34048] |
Fri, 14 October 2011 04:48 |
LeiMing
Messages: 21 Registered: September 2009 Location: China
|
Promising Member |
|
|
today I have a try on version 4011.
the compiler's message shown correctly.
theIDE editor is still not works with those with bom so I convert the source code manually.
this is what I have tested in 3211
vc toolkit 7.1 sp1 eng
with bom: work
without bom: compile with no error but the text in my program shown incorrectly, so I say it "not work".
vc 2008 sp1 eng
with bom: work
without bom: it doesn't compile
vc 2008 sp1 chs
with bom: work
without bom: it doesn't compile
vc 2010 eng
with bom: work
without bom: it doesn't compile
vc 2010 chs
with bom: work
without bom: it doesn't compile
tdm-gcc 4.5.2
with bom: work
without bom: work
openwatcom 1.9 doesn't compile the source code. it runs into error from the first library of ultimate++.
(in my experience, openwatcom compiler only compiles a small number of opensource libraries...orz)
mingw-gcc 3.4 doesn't compile the ultimate++ library.
by the way, when I setup the build method, I found that the vc 8 build method created by automatic setup won't have the correct sdk directory.
environment:
intel i3 2120
4G ram
1T hd (fs: ntfs)
windows 7 32bit sp1 ultimate chinese
[Updated on: Fri, 14 October 2011 05:16] Report message to a moderator
|
|
|
|
Re: UTF-8 Encoded src files and vc10free Chinese edition [message #38997 is a reply to message #34078] |
Tue, 05 February 2013 15:29 |
LeiMing
Messages: 21 Registered: September 2009 Location: China
|
Promising Member |
|
|
Hello,
I test it with stable release ver 5485 again,
the source compiled and message shows normally.
but vc's output message is still displayed incorrectly.
like this:
Quote: | NsisVPatcherCreator.cpp
C:\upp\uppsrc\CtrlLib/TreeCtrl.h(323) : error C2872: “TreeCtrl? 不明符号
C:\upp\uppsrc\CtrlLib/TreeCtrl.h(1) : TreeCtrl?
? “C:\upp\uppsrc\CtrlLib/TreeCtrl.h(1) : Upp::TreeCtrl?
C:\upp\uppsrc\CtrlLib/TreeCtrl.h(323) : error C2872: “TreeCtrl? 不明符号
C:\upp\uppsrc\CtrlLib/TreeCtrl.h(1) : TreeCtrl?
? “C:\upp\uppsrc\CtrlLib/TreeCtrl.h(1) : Upp::TreeCtrl?
C:\upp\uppsrc\CtrlLib/TreeCtrl.h(325) : error C2872: “TreeCtrl? 不明符号
C:\upp\uppsrc\CtrlLib/TreeCtrl.h(1) : TreeCtrl?
? “C:\upp\uppsrc\CtrlLib/TreeCtrl.h(1) : Upp::TreeCtrl?
|
Currently I'm trying replace language pack of vc with an English one to work around.
hope it would be fixed.
some possible useful information:
I run notepad++ and select menu "encoding -> encode in ansi", paste the chaos output message from the IDE, and select menu "encoding -> encode in utf8", many of the characters become readable, the left may be destroyed during copy and paste.
[Updated on: Tue, 05 February 2013 16:24] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Sep 20 23:01:07 CEST 2024
Total time taken to generate the page: 0.02965 seconds
|
|
|