Re: [Winmerge-translate] Puzzles about po-file-encoding and rc-file-compiling by 2.7.5.2 and 2.7.5.
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
From: Wei-cheng <wc...@pc...> - 2007-10-09 13:52:45
|
Tim, Thank you. I feel embarrassed. (Mir ist peinlich.) You are right, the po is encoded with local encoding. I made a mistake somehow. And after several days I can not remember what I have done before. So I tried to reproduce those operations today. And the compiliation problem remains. I had the following operations: 1. downloaded WinMerge-2.7.5.3-src.7z, unpacked it, 2. updated its ChineseTraditional.po with English.pot, revise some translations, 3. opened \WinMerge-2.7.5.3-src\Tools\MakeResDll\MakeResDll.dsw to build MakeResDll.exe. The messages in pane of vc6 show as follows: --------------------Configuration: MakeResDll - Win32 Debug-------------------- Compiling resources... Compiling... StdAfx.cpp Compiling... MakeResDll.cpp c:\program files\winmerge-src\winmerge-2.7.5.3-src\tools\makeresdll\makeresdll.cpp(1= 87) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std:= :allocator<char> > const *,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,int>' : identifier was truncated to '255' characters in the debug information c:\program files\winmerge-src\winmerge-2.7.5.3-src\tools\makeresdll\makeresdll.cpp(1= 87) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std:= :allocator<char> > *,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,int>' : identifier was truncated to '255' characters in the debug information RegKey.cpp c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector<std::basic_string<char,std::char_traits<char>,std::allocator= <char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::alloc= ator<char> > > >::vector<std::basic_string<char,std::char_traits<char>,std::allocator<ch= ar> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::alloc= ator<char> > > >' : identifier was truncated to '255' characters in the debug information c:\program files\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector<std::basic_string<char,std::char_traits<char>,std::allocator= <char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::alloc= ator<char> > > >::~vector<std::basic_string<char,std::char_traits<char>,std::allocator<c= har> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::alloc= ator<char> > > >' : identifier was truncated to '255' characters in the debug information UnicodeString.cpp Linking... LINK : LNK6006: program database C:\Program Files\WinMerge-src\WinMerge-2.7.5.3-src\BuildTmp\MakeResDll___Win32_Debug= \MakeResDll.pdb missing; performing full link MakeResDll.exe - 0 error(s), 4 warning(s) (The same compiliation by 2.7.5.1 and 2.7.4 did not show warnings.) 4. copied MakeResDll.exe to \WinMerge-2.7.5.3-src\Src\Languages 5. started CreateRcFilesFromPoFiles.vbs to get MergeChineseTraditional.rc= 6. started BuildOneLanguage.vbs to compile MergeChineseTraditional.rc. It failed, and the error message is: "Unhandled exception in MakeResDll.exe in OxC0000005: Access Violation". ChineseTraditional.po and MergeChineseTraditional.rc are attached. I have SciTE too. SciTE cannot detect encoding in any situation automatically. Which encoding it adopts depends in a certain degree on the user-setting. After choosing encoding the user can see the change on screen, and determine which encoding a file in question uses. It is difficult for you to detect local encodings because your PC may not have the required font. To detect unicode-encoding is in most situations easier owing to BOM even though lacking the required font. Wei-cheng Tim Gerundt =E6=8F=90=E5=88=B0: > Kimmo Varis wrote: >>> Since 2.7.5.2 the encoding of .po file were changed into utf-8. And >>> CreateRcFilesFromPoFiles.vbs produces a rc file which contains utf-8 >>> encoded strings. >> >> This sounds like a bug. The header in PO files says its CP-xxx, so >> there shouldn't be UTF-8 content. Also I think .rc files don't even >> support UTF-8. >> >> We still support W98 so we can't rely on UTF-8 anyways. >> >> Tim? >=20 > Sorry for the long silence, but I was on vacation! ;) >=20 > I didn't change the CODEPAGE of the PO files. The PO files in SVN looks= > all normal and my editor SciTE <http://scintilla.org/SciTE.html> says > there are not UTF-8. I have also no problems to compile the PO files > with MakeResDll.exe. (I use VC6 too!) So I can't reproduce your problem= =2E.. >=20 > How do you get the PO file? Do you use a SVN client like TortoiseSVN > <http://tortoisesvn.net/>? Or do you download the latest source code > archives from SF.net? Or use the "SVN Browse" page from SF.net > <http://winmerge.svn.sourceforge.net/viewvc/winmerge/>? Maybe your > browser or archive program change the file to UTF-8? >=20 > Greetings, > Tim >=20 >=20 |