Encoding issues

From: Christian Biesinger (cbiesinger@web.de)
Date: Sat Nov 02 2002 - 11:07:29 EST

  • Next message: Jordi Mas: "Re: Encoding issues"

    Hi,
    so you may remember that some time ago, I checked in a patch to change the
    encoding that AP_DiskStringSet uses to whatever
    XAP_App::getDefaultEncoding uses (or something like that, can't remember
    what exactly I did :) ).

    Anyway, it looks like this broke non-US-ASCII characters in the statusbar,
    because of this piece of code in ap_StatusBar.cpp, line 493, in
    AP_StatusBar::setStatusMessage(const char * pBuf, int redraw)
            UT_UCS4_strcpy_char(bufUCS,pBuf);

    That function just uses the encoding that the default constructor of mbtowc
    thinks is good as the source encoding. That seems to be ISO-8859-1 for me.
    However, due to the patch I mentioned above, that string is already in
    UTF-8.
    This means that the statusbar will not display special characters (like,
    but not limited to, german umlauts) correctly. Instead, it will show
    characters looking like undecoded UTF-8 (like Ì)

    So... the question is:
    What's the best way for fixing this?
    Should UT_UCS4_strcpy_char take an additional (maybe optional) argument,
    specifying the charset to convert from? AP_StatusBar would pass the result
    of XAP_App::getDefaultEncoding to it, and this would work...

    Other ideas?

    (Should I put this in bugzilla instead?)



    This archive was generated by hypermail 2.1.4 : Sat Nov 02 2002 - 11:16:10 EST