Bug 151429 - DDE link drops Unicode characters not representable in Windows system encoding
Summary: DDE link drops Unicode characters not representable in Windows system encoding
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Windows (All)
: medium normal
Assignee: Mike Kaganski
URL: https://forumooo.ru/index.php?topic=9...
Whiteboard: target:7.5.0 target:7.4.3 target:7.6.0
Keywords:
Depends on:
Blocks: Files-Linked
  Show dependency treegraph
 
Reported: 2022-10-08 18:25 UTC by Mike Kaganski
Modified: 2024-03-31 12:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample spreadsheet document (670 bytes, application/vnd.oasis.opendocument.spreadsheet)
2022-10-09 04:48 UTC, Mike Kaganski
Details
Sample text document with DDE link to the spreadsheet (889 bytes, application/vnd.oasis.opendocument.text)
2022-10-09 04:50 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-10-08 18:25:30 UTC
1. Create a Calc document, and put some text into A1, including some Cyrillic and Japanese: e.g., "テストabcабв"
2. Save it as ODS
3. Select A1, and copy to clipboard
4. Create a Writer document, and Paste Special -> as DDE Link.

The pasted data turns all the characters not representable in current system encoding into question marks. This means that on most Linux systems, having Unicode as system encoding, everything would arrive OK; but on Windows, the text will arrive with the question marks.
Comment 1 Mike Kaganski 2022-10-08 19:18:54 UTC
https://gerrit.libreoffice.org/c/core/+/141125
Comment 2 Commit Notification 2022-10-08 22:17:45 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/94df17f58fe6269452b7252b712a89978c444bec

tdf#151429: don't convert OUStrings to system encoding

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Mike Kaganski 2022-10-09 04:48:09 UTC
Created attachment 182920 [details]
Sample spreadsheet document
Comment 4 Mike Kaganski 2022-10-09 04:50:01 UTC
Created attachment 182921 [details]
Sample text document with DDE link to the spreadsheet

I couldn't figure how to create a unit test, when the DDE item is the full absolute local path to the file.
Comment 5 Commit Notification 2022-10-11 14:35:47 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/2df4bd1dda0b233aadd8e09012df7b8530fa631c

tdf#151429: don't convert OUStrings to system encoding

It will be available in 7.4.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2023-02-27 10:20:45 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b3b18f8606131fc9998e872de84aab475acabf1a

Related: tdf#151429 Move fix for tdf#152717 to ScByteSequenceToString

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.