Bug 45543 - FILEOPEN: Encoding error for Japanese RTF file
Summary: FILEOPEN: Encoding error for Japanese RTF file
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium major
Assignee: Miklos Vajna
URL:
Whiteboard: target:3.5.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-02-02 06:54 UTC by Haruyuki Fujimaki
Modified: 2012-04-12 09:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample file created with MS-Word 2007 (32.94 KB, application/rtf)
2012-02-04 04:16 UTC, Haruyuki Fujimaki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Haruyuki Fujimaki 2012-02-02 06:54:51 UTC
RTF file containing Japanese characters created in MS-Word can not be opened correctly. Wrong encoding. This error appears in buth Windows and Linux (ubuntu).
Comment 1 Urmas 2012-02-03 11:38:35 UTC
Please attach a document.
Comment 2 Haruyuki Fujimaki 2012-02-04 04:16:11 UTC
Created attachment 56596 [details]
Sample file created with MS-Word 2007
Comment 3 s-joyemusequna 2012-02-04 04:50:35 UTC
I confirm the error with LibO 3.5 Beta2 on Windows XP (with east-asian signs installed) and Windows Vista 64.

I works fine with LibO 3.4.5 (tested on Windows Vista 64). 

This is a regression.
Comment 4 Caolán McNamara 2012-02-08 06:18:04 UTC
In RTFDocumentImpl::resolveChars we read in one code unit at a time but in a stateful encoding like ms932 we need all chars. we can't convert half the input sequence at a time
Comment 5 Miklos Vajna 2012-02-13 08:58:01 UTC
Reproduced, will have a look at it soon. We already handle multiple \u tokens in one go, something similar could be done for \' tokens.
Comment 7 Haruyuki Fujimaki 2012-02-13 21:55:25 UTC
Thank you!
Comment 8 Not Assigned 2012-03-12 06:45:25 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ede11e29bf051e3d78503333b45118cd011d582a&g=libreoffice-3-5

fdo#45543 fix RTF import of ms932-encoded characters


It will be available in LibreOffice 3.5.2.
Comment 9 Jean-Baptiste Faure 2012-03-21 15:16:31 UTC
Works well in LO 3.5.2. Closing. Thank you.
Comment 10 Haruyuki Fujimaki 2012-03-22 02:01:24 UTC
Thank you very much !