View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012075 | CMake | CMake | public | 2011-04-13 04:36 | 2015-06-01 08:38 | ||||
Reporter | zouguangxian | ||||||||
Assigned To | Clinton Stimpson | ||||||||
Priority | high | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | Windows | OS Version | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | CMake 3.2 | |||||||
Summary | 0012075: generated .vcproj with wrong encoding | ||||||||
Description | for example, in Source\cmGlobalVisualStudio7Generator.cxx: line 636 //---------------------------------------------------------------------------- std::string cmGlobalVisualStudio7Generator::WriteUtilityDepend(cmTarget* target) { std::string pname = target->GetName(); pname += "_UTILITY"; std::string fname = target->GetMakefile()->GetStartOutputDirectory(); fname += "/"; fname += pname; fname += ".vcproj"; cmGeneratedFileStream fout(fname.c_str()); fout.SetCopyIfDifferent(true); this->CreateGUID(pname.c_str()); std::string guid = this->GetGUID(pname.c_str()); fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n" the encoding always be "Windows-1252", but if the path include chinese characteres, the generated .vcproj can't be open correctly in Visual Studio. | ||||||||
Additional Information | the solution is: 1. determine the codepage 2. set the correct encoding. like the following: std::string guid = this->GetGUID(pname.c_str()); std::string encoding = "Windows-1252"; switch(_getmbcp()) { case 936: encoding = "gb2312"; break; default: break; } fout << "<?xml version=\"1.0\" encoding = \"" << encoding << "\"?>\n" | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |||||||||||
|
Relationships |
Notes | |
(0028705) zouguangxian (reporter) 2012-02-23 21:26 |
It is duplication of 0005097, 0010180. |
(0028711) Brad King (manager) 2012-02-24 08:42 |
The encoding of generated project files will also have to be honored in the rest of the generator to actually write out a byte stream of characters using that encoding. See 0012074:0028710. |
(0037717) Clinton Stimpson (developer) 2015-01-16 10:12 |
Fixed by switching to utf-8 internally. http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=cdc29c3 [^] |
(0038843) Robert Maynard (manager) 2015-06-01 08:38 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-04-13 04:36 | zouguangxian | New Issue | |
2012-02-23 21:26 | zouguangxian | Note Added: 0028705 | |
2012-02-24 08:29 | Brad King | Relationship added | related to 0010180 |
2012-02-24 08:30 | Brad King | Relationship added | related to 0012074 |
2012-02-24 08:42 | Brad King | Note Added: 0028711 | |
2012-02-24 08:42 | Brad King | Status | new => backlog |
2015-01-15 23:41 | Clinton Stimpson | Assigned To | => Clinton Stimpson |
2015-01-15 23:41 | Clinton Stimpson | Status | backlog => assigned |
2015-01-16 10:12 | Clinton Stimpson | Note Added: 0037717 | |
2015-01-16 10:12 | Clinton Stimpson | Status | assigned => resolved |
2015-01-16 10:12 | Clinton Stimpson | Fixed in Version | => CMake 3.2 |
2015-01-16 10:12 | Clinton Stimpson | Resolution | open => fixed |
2015-06-01 08:38 | Robert Maynard | Note Added: 0038843 | |
2015-06-01 08:38 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |