[cmake-developers] Question regarding [58e3d49] MSVC: Fix encoding of Visual Studio 10+ project files

2014-03-06 Thread Dominik Bernhardt

Hi,

I have a question regarding the change [58e3d49] that changed the  
encoding of generated visual studio project files from utf-8 to  
Windows-1252.
Although the encoding header in the generated xml file was changed the  
files are still written as utf. Visual Studio does not complain about  
that fact. However If I try to parse the xml file with some other xml  
parsers they will complain about that encoding mismatch.

What was the reason to change the encoding from utf-8 to Windows-1252?

Dominik



--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Question regarding [58e3d49] MSVC: Fix encoding of Visual Studio 10+ project files

2014-03-06 Thread Clinton Stimpson
On Thursday, March 06, 2014 11:09:24 AM Dominik Bernhardt wrote:
 Hi,
 
 I have a question regarding the change [58e3d49] that changed the
 encoding of generated visual studio project files from utf-8 to
 Windows-1252.
 Although the encoding header in the generated xml file was changed the
 files are still written as utf. Visual Studio does not complain about
 that fact. However If I try to parse the xml file with some other xml
 parsers they will complain about that encoding mismatch.
 What was the reason to change the encoding from utf-8 to Windows-1252?
 
 Dominik

Hi,

CMake's internal encoding on Windows is currently ANSI, not UTF-8.
So the generated xml file should actually be ANSI, even if the xml header used 
to say UTF-8.

I do realize that setting the encoding to Windows-1252 encoding is not 
entirely correct, even for ANSI, but it was an improvement.  Previously, only 
the 7-bit ASCII subset of strings were allowed to be written out by CMake to 
the xml file with a utf-8 header, and still have a valid xml file.

With that commit, a the larger 8-bit Latin-1 set of characters can be written 
out and still have a valid xml file, which helps the Western European 
languages, but still not other parts of the world.  The other parts of the 
world should still have the same limitation as before, when the header said it 
was a UTF-8 file.

There has been work going into CMake to support a UTF-8 encoding on Windows, 
but it is not complete.

- Clint
-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers