[go: up one dir, main page]

Menu

#23 UTF-32 support not working correctly

colorer-take5
closed-fixed
General (16)
5
2003-12-30
2003-11-10
No

Although the DString class can wrap w4char, the
DString::operator[] is not conformant with the Unicode
Standard. The operator casts the w4char to wchar,
which cuts off the upper 16 bits of the value. This would
result in undefined behaviour in programs that use UTF-
32 / UCS-4 as a native format for Unicode strings and
that pass Unicode strings with characters > 0xFFFF to
the Parser. Either Colorer should be able to work with
w4char entirely or DString::operator[] should be modified
so that it converts characters > 0xFFFF into the
Unicode replacement character 0xFFFD. At least this
would return a defined character value to the Parser.

Discussion

  • Igor Russkih

    Igor Russkih - 2003-11-26

    Logged In: YES
    user_id=313042

    I've changed DString behavior to return 0xFFFD repl. character
    for 4-byte sequences.

     
  • Igor Russkih

    Igor Russkih - 2003-11-26
    • status: open --> closed
     
  • Igor Russkih

    Igor Russkih - 2003-12-30
    • assigned_to: nobody --> lomecb
     
  • Igor Russkih

    Igor Russkih - 2003-12-30
    • status: closed --> closed-fixed
     

Log in to post a comment.