STRING TOUPPER and TOLOWER miss diacritic characters
The following CMake script:
function(test command input expected)
string(${command} ${input} result)
if(NOT result STREQUAL expected)
message(SEND_ERROR "string(${command}): \n"
"Input___: ${input} \n"
"Expected: ${expected}\n"
"Got_____: ${result}")
endif()
endfunction()
set(lower "a á ā è ǐ õ ü ŭ ç ĉ c")
set(upper "A Á Ā È Ǐ Õ Ü Ŭ Ç Ĉ C")
test(TOUPPER ${lower} ${upper})
test(TOLOWER ${upper} ${lower})
fails with the following output:
CMake Error [...] (message):
string(TOUPPER):
Input___: a á ā è ǐ õ ü ŭ ç ĉ c
Expected: A Á Ā È Ǐ Õ Ü Ŭ Ç Ĉ C
Got_____: A á Ā è Ǐ õ ü ŭ ç ĉ C
CMake Error [...] (message):
string(TOLOWER):
Input___: A Á Ā È Ǐ Õ Ü Ŭ Ç Ĉ C
Expected: a á ā è ǐ õ ü ŭ ç ĉ c
Got_____: a Á ā È ǐ Õ Ü Ŭ Ç Ĉ c
Note: GitLab's Markdown code blocks seem to not support those characters well too (at least in Preview mode). I'm attaching the original file and output as UTF-8 files: string-TOUPPER-unicode.cmake output.txt