https://bugs.documentfoundation.org/show_bug.cgi?id=106110
Bug ID: 106110
Summary: UTF-8 text import incorrectly detected as UTF-16 if
linebreaks are CRLF
Product: LibreOffice
Version: 5.1.4.2 release
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: minor
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Description:
When pasting UTF-8 external simple text into Calc, if the text has linebreaks
as Windows-style newlines CR+LF (0x0D0A), the text is incorrectly detected as
UTF-16.
If the character encoding is manually set to UTF-8, then Calc inserts an empty
line after every line.
Steps to Reproduce:
1. Generate some text in any text application where you can be sure that
newlines are Windows-style CRLF, and that the encoding is UTF-8, e.g. Notepad++
2. Copy that text, ensuring it has several lines.
3. Paste it over any Calc cell, to open the text import window.
4. Notice the character encoding detected by Calc is UTF-16, not UTF-8.
5. Change the encoding to the correct UTF-8.
6. See how in the preview every even row is empty.
Actual Results:
If you don't touch anything and the text doesn't include any UTF-8 character
combinations which translate to an UTF-16 character, nothing happens. However
until I noticed this problem, sometimes I had strange characters in my text
imports, which might have been caused by this problem. I can't provide any
specific text string to trigger that problem but I am pretty sure it exists.
Expected Results:
The text should correctly be detected as UTF-8 to avoid potential problems, and
when doing so, the CRLF combination shouldn't be interpreted as two consecutive
newlines.
Reproducible: Always
User Profile Reset: No
Additional Info:
This bug is not triggered when opening a file with the same text, UTF-8 with
CRLF.
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101
Firefox/51.0
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs