Bug 155176 - Windows file picker does not find files with accented letters
Summary: Windows file picker does not find files with accented letters
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.6.0
Keywords: bibisected, bisected, regression
: 155047 (view as bug list)
Depends on:
Blocks: File-Dialog
  Show dependency treegraph
 
Reported: 2023-05-07 08:30 UTC by Gabor Kelemen (allotropia)
Modified: 2023-05-12 09:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the document (90.69 KB, image/png)
2023-05-07 08:30 UTC, Gabor Kelemen (allotropia)
Details
Wrongly encoded file (26.13 KB, application/vnd.oasis.opendocument.text)
2023-05-07 08:33 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-05-07 08:30:03 UTC
Created attachment 187121 [details]
Screenshot of the document

1. Download attachment 67460 [details] (but other files with accented/weirdly encoded names such as attachment 171143 [details] will also do)
2. Open with the file picker

-> "C:\Users\Gabor\Downloads\OTP SZ�P igenylőlap adatkezelesi word.docx does not exist."

error, with some accented characters replaced with ? sign - interestingly only the "É" but not the "ő".

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 83b1f6b58a30bdb589e9ce73deef39f021aebde1
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

Seems to have started with

https://git.libreoffice.org/core/+/df4255c315f8061fbe7b3771122926589be7dfad

author	Mike Kaganski <mike.kaganski@collabora.com>	Sat Apr 22 16:12:23 2023 +0200
committer	Mike Kaganski <mike.kaganski@collabora.com>	Sat Apr 22 17:45:50 2023 +0200

Simplify lcl_getURLFromShellItem

Adding CC to: Mike Kaganski
Comment 1 Gabor Kelemen (allotropia) 2023-05-07 08:33:39 UTC
Created attachment 187122 [details]
Wrongly encoded file

Another angle: if I save a file with the standard Hungarian test name "árvíztűrő_tükörfúrógép" (which is containing all our accented letters) the result on the FS is �rv�ztűrő_t�k�rf�r�g�p.odt - hopefully BZ does not butcher this.
Comment 2 Mike Kaganski 2023-05-07 08:39:57 UTC
OMG, I was plain wrong imagining that Windows could generate a sane URL. It uses a Western 8-bit codepage in the URL.
Comment 3 Mike Kaganski 2023-05-07 08:55:02 UTC
https://gerrit.libreoffice.org/c/core/+/151456
Comment 4 Commit Notification 2023-05-07 11:35:23 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/54d07afac60d68fae9910724c5f273658e9a82cc

tdf#155176: only use item's URL in case filesystem path failed

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.
Comment 5 Mike Kaganski 2023-05-12 04:36:36 UTC
*** Bug 155047 has been marked as a duplicate of this bug. ***
Comment 6 Stefan_Lange_KA@T-Online.de 2023-05-12 06:55:09 UTC
I have tested with
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 662840c33d7736a8d873b2c53f6d0cb6dd3b2998
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded

Result: OK!
Documents were found even if the path names or filenames contained umlauts or accented characters.
Also the error at save of documents with such characters in the path name or filename (described in the second part of Comment 4 of Bug 155047) did occur no longer.
Comment 7 Stefan_Lange_KA@T-Online.de 2023-05-12 07:13:59 UTC Comment hidden (no-value)
Comment 8 Stéphane Guillou (stragu) 2023-05-12 09:11:17 UTC
Verified by Stefan. Thanks everyone!