MantisBT - CMake | |||||||||||||||
View Issue Details | |||||||||||||||
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. | ||||||||||||||
Steps To Reproduce | |||||||||||||||
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. | ||||||||||||||
Relationships |
| ||||||||||||||
Attached Files | |||||||||||||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|