Avoid constructing QChar from non-BMP codepoints
This is fallout from use of UTF-16. While konsole uses an internal 32 bit character type since 5128781a in 2018, there were still scattered places where QChar (which is 16 bit) was constructed from our internal 32 bit character, potentially causing mojibake or other confusion on Qt5 due to truncation to 16 bits, and assert failures on Qt6. As an example of confusion on Qt5 before this commit, with "Trim trailing spaces" enabled, run the following, and try to select and copy the horse pictogram: printf "Hey, horse, don't run away from me:\U10085\n" U+10085 gets confused with U+0085, which is a space character (NEXT LINE). You'll never catch the horse (don't fret, Achilles had the same problem with a tortoise). See https://softwareengineering.stackexchange.com/questions/102205/should-utf-16-be-considered-harmful (cherry picked from commit d5903c47)
Please register or sign in to comment