Bug 122327 - Cannot open file with non-English filename
Summary: Cannot open file with non-English filename
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice Online
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 121126 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-26 04:59 UTC by Franklin Weng
Modified: 2022-11-06 05:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot - CODE error (111.84 KB, image/png)
2018-12-26 04:59 UTC, Franklin Weng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franklin Weng 2018-12-26 04:59:12 UTC
Created attachment 147824 [details]
Screenshot - CODE error

I cannot open files with Chinese filename in 

This version of Collabora Online Development Edition (CODE) is powered by
LOOLWSD
4.0.0 (git hash: 173510f)
LOKit
Collabora Office 6.0-18 (git hash: e74e598)

on Nextcloud.

When I renamed the file into English filename it could be opened successfully.

The error log of loolwsd is at

https://pastebin.com/SugnsUHd

Not sure if it is about the language support - when I edit loolwsd.xml there is no zh_TW in the supported language.
Comment 1 Andras Timar 2018-12-27 10:05:18 UTC
Language support in loolwsd.xml means something else. I tried to clarify it in https://gerrit.libreoffice.org/#/c/65636/

Your problem is probably the missing en_US.UTF-8 locale. There is a workaround: on Debian you have to install locales-all package. 

We explicitly set LC_ALL to en_US.UTF-8 in wsd/LOOLWSD.cpp. Maybe C.UTF-8 would be good, too, but is has to be tested. Without UTF-8 support, LibreOffice cannot handle non-ASCII filenames. Non-ASCII characters are replaced to ? marks, and file will not be found in the subsequent call.

I lowered the importance of the bug, because there is a workaround.
Comment 2 Franklin Weng 2018-12-27 10:20:45 UTC
(In reply to Andras Timar from comment #1)
> Language support in loolwsd.xml means something else. I tried to clarify it
> in https://gerrit.libreoffice.org/#/c/65636/
> 
> Your problem is probably the missing en_US.UTF-8 locale. There is a
> workaround: on Debian you have to install locales-all package. 
> 
> We explicitly set LC_ALL to en_US.UTF-8 in wsd/LOOLWSD.cpp. Maybe C.UTF-8
> would be good, too, but is has to be tested. Without UTF-8 support,
> LibreOffice cannot handle non-ASCII filenames. Non-ASCII characters are
> replaced to ? marks, and file will not be found in the subsequent call.
> 
> I lowered the importance of the bug, because there is a workaround.

Though the workaround sounds strange to me (like the locale in the server is set to zh_TW.UTF-8, which should also support UTF-8 too), but it does work.  Thanks for providing it.
Comment 3 Aron Budea 2019-02-03 23:41:36 UTC
*** Bug 121126 has been marked as a duplicate of this bug. ***
Comment 4 Aron Budea 2022-11-06 05:13:42 UTC
This was fixed in CODE/Collabora Online, marking as WFM.