[cmake-developers] Cmake configure unicode?

clinton at elemtech.com clinton at elemtech.com
Wed Dec 25 14:23:38 EST 2013


If you want cmake to support unicode with configure_file right now, use utf-8, not utf-16.
I just tried with a utf-8 file with various non-ascii characters on Windows and configure_file() works for me.

>From your use of "cmd /U", it appears you are attempting to do utf-16 (which is what Microsoft means when they say "Unicode"), which CMake doesn't support.

Support for looking for a BOM in a CMakeLists.txt file was added recently, and it throws an error for utf-16/utf-32 files.
Perhaps future versions of CMake will look at the BOM when using configure_file, and I assume it will throw an error on your utf-16 files as well instead of giving you garbage.

Clint

----- Original Message -----
> is there a wish list of features for 3.0?
> 
>  * unicode support
>   * offer commands available with 'cmake -e ....' as direct commands
> (I think that's the option... copy_if_different ?)  or did I just not
> find the alias?
> 
> On Thu, Oct 10, 2013 at 5:36 AM, Brad King <brad.king at kitware.com> wrote:
> > On 10/10/2013 12:34 AM, J Decker wrote:
> >> Should cmake be able to configure unicode, if the unicode file has
> >> appropriate byte order indicators maybe?
> >
> > Not currently.  No effort has been made to support BOMs, encoding,
> > etc. except that CTest expects UTF-8 output from tests and submits
> > that to CDash in the xml files.
> >
> > -Brad
> --
> 
> 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
> 



More information about the cmake-developers mailing list