[Libreoffice-bugs] [Bug 37859] Odb data copied to Calc showed wrong encoding in Windows

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue May 30 22:01:37 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=37859

Julien Nabet <serval2412 at yahoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|libreoffice-bugs at lists.free |serval2412 at yahoo.fr
                   |desktop.org                 |

--- Comment #36 from Julien Nabet <serval2412 at yahoo.fr> ---
Thank you Urmas and himajin100000, let's give a try with
https://gerrit.libreoffice.org/#/c/38253/

Urmas: I know that's it's a cold case but if you have some time, could you be
more explicit about svl part of
https://bugs.documentfoundation.org/show_bug.cgi?id=37859#c16 ?
I suppose it concerns Out_Char function and most particularly this part:
    130                     //If we can't convert to the dest encoding, or if
    131                     //it's an uncommon multibyte sequence which most
    132                     //readers won't be able to handle correctly, then
    133                     //export as unicode
    134                     OUString sBuf(&c, 1);
    135                     OString sConverted;
    136                     sal_uInt32 nFlags =
    137                         RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
    138                         RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR;
    139                     bool bWriteAsUnicode =
!(sBuf.convertToString(&sConverted,
    140                                          eDestEnc, nFlags))
    141                                             ||
(RTL_TEXTENCODING_UTF8==eDestEnc); // #i43933# do not export UTF-8 chars in
RTF;
    142                     if (bWriteAsUnicode)
    143                     {
    144                         (void)sBuf.convertToString(&sConverted,
    145                             eDestEnc, OUSTRING_TO_OSTRING_CVTFLAGS);
    146                     }
    147                     const sal_Int32 nLen = sConverted.getLength();

See
http://opengrok.libreoffice.org/xref/core/svtools/source/svrtf/rtfout.cxx#130
If you confirm, I think it could be interesting to have a bugtracker about this
specific part with a failing case.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170530/4ca72471/attachment.html>


More information about the Libreoffice-bugs mailing list