The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15326
======================================================================
Reported By: Kwabena W. Agyeman
Assigned To:
======================================================================
Project: CMake
Issue ID: 15326
Category: CMake
Reproducibility: always
Severity: feature
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-12-24 12:48 EST
Last Modified: 2014-12-24 12:48 EST
======================================================================
Summary: CMake can't read UTF-16 source files
Description:
I'm trying to do dependency parsing in cmake for parallax propeller spin files.
This involves opening up *.spin code files and parsing them using the
file(STRINGS ... REGEX ...) command. Most spin files are saved as ASCII/UTF-8
files and there are no problems parsing these files. However, some spin files
are saved in UTF-16 format which allows the use of special schematic characters
in the files. Using the file(STRINGS ... REGEX ...) command does not work on
UTF-16 files as cmake is unable to parse them.
Steps to Reproduce:
The below code should find the "DAT" string in the attached file...
file(STRINGS "Quadrature Encoder.spin" OUT REGEX "^[\t ]*[Dd][Aa][Tt].*$")
Additional Information:
Saving the problem UTF-16 files as UTF-8 files fixes the issue. But, I can't
just convert the source files. There's a lot of legacy spin code I need to
support that uses the UTF-16 format for the special schematic characters.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-12-24 12:48 Kwabena W. AgyemanNew Issue
2014-12-24 12:48 Kwabena W. AgyemanFile Added: Quadrature Encoder.spin
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers