mirror of
https://github.com/reactos/CMake.git
synced 2024-12-05 02:06:34 +00:00
Merge topic 'execute_process_UTF8_keyword'
8caec41e
execute_process: Allow UTF-8 as a synonym for the UTF8 keyword
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !1623
This commit is contained in:
commit
f4a3143940
@ -90,8 +90,10 @@ Options:
|
||||
Use the ANSI codepage.
|
||||
``OEM``
|
||||
Use the original equipment manufacturer (OEM) code page.
|
||||
``UTF8``
|
||||
Use the UTF-8 codepage.
|
||||
``UTF8`` or ``UTF-8``
|
||||
Use the UTF-8 codepage. Prior to CMake 3.11.0, only ``UTF8`` was accepted
|
||||
for this encoding. In CMake 3.11.0, ``UTF-8`` was added for consistency with
|
||||
the `UTF-8 RFC <https://www.ietf.org/rfc/rfc3629>`_ naming convention.
|
||||
|
||||
If more than one ``OUTPUT_*`` or ``ERROR_*`` option is given for the
|
||||
same pipe the precedence is not specified.
|
||||
|
@ -13,7 +13,7 @@ cmProcessOutput::Encoding cmProcessOutput::FindEncoding(
|
||||
std::string const& name)
|
||||
{
|
||||
Encoding encoding = Auto;
|
||||
if (name == "UTF8") {
|
||||
if ((name == "UTF8") || (name == "UTF-8")) {
|
||||
encoding = UTF8;
|
||||
} else if (name == "NONE") {
|
||||
encoding = None;
|
||||
|
@ -31,7 +31,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
const std::string encoding(argv[1]);
|
||||
#ifdef _WIN32
|
||||
if (encoding == "UTF8") {
|
||||
if ((encoding == "UTF8") || (encoding == "UTF-8")) {
|
||||
setEncoding(consoleOut, CP_UTF8);
|
||||
} else if (encoding == "ANSI") {
|
||||
setEncoding(consoleOut, CP_ACP);
|
||||
|
1
Tests/RunCMake/execute_process/EncodingUTF-8-stderr.txt
Normal file
1
Tests/RunCMake/execute_process/EncodingUTF-8-stderr.txt
Normal file
@ -0,0 +1 @@
|
||||
यूनिकोड είναι very здорово!
|
@ -10,6 +10,7 @@ run_cmake_command(MergeOutputVars ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/Mer
|
||||
run_cmake(EncodingMissing)
|
||||
if(TEST_ENCODING_EXE)
|
||||
run_cmake_command(EncodingUTF8 ${CMAKE_COMMAND} -DTEST_ENCODING=UTF8 -DTEST_ENCODING_EXE=${TEST_ENCODING_EXE} -P ${RunCMake_SOURCE_DIR}/Encoding.cmake)
|
||||
run_cmake_command(EncodingUTF-8 ${CMAKE_COMMAND} -DTEST_ENCODING=UTF-8 -DTEST_ENCODING_EXE=${TEST_ENCODING_EXE} -P ${RunCMake_SOURCE_DIR}/Encoding.cmake)
|
||||
endif()
|
||||
|
||||
if(EXIT_CODE_EXE)
|
||||
|
Loading…
Reference in New Issue
Block a user