RC1: Unable to read files with accents in names on Windows

Richard Kimberly Heck rikiheck at gmail.com
Mon Jan 22 23:21:42 UTC 2024


On 1/22/24 17:53, Thibaut Cuvelier wrote:
> On Mon, 22 Jan 2024 at 23:00, Richard Kimberly Heck 
> <rikiheck at gmail.com> wrote:
>
>     On 1/22/24 16:53, didiergabory at free.fr wrote:
>>     I also realize that I can no longer load images whose names
>>     contain accents. In any case, that’s what’s happening with the
>>     file I just sent you. If I rename the file: SchemaCinematique.pdf
>>     to SchemaCinématique.pdf then I can read “Error converting to a
>>     readable format.”
>
>     That's a serious bug. Can anyone on Windows check this?
>
> I can reproduce with PDF files whose names have accents, but not PNG 
> (with the same file name apart from the extension). If I export the 
> file to LyX 2.3 and load it with LyX 2.3.7, the PDF file doesn't have 
> any issue (with MikTeX, up to date).
>
> I'm attaching the logs (View > Messages Pane, with all logs enabled) 
> and the corresponding test files (LyX 2.3 and 2.4).

The conversion script has:

infile = "C:/Users/Thibaut/Desktop/p k .pdf"

when the input file was: ~\Desktop\píkà.pdf. The accented characters 
have been stripped. This is not a surprise, though, since 
toFilesystemEncoding has a comment that says it does not work with 
non-ASCII characters on Windows. The puzzle is why this worked on 2.3.7. 
None of this code has changed, so far as I can see.

Enrico, do you know if there is a reason not to use 
toSafeFilesystemEncoding here instead? This is in GraphicsConverter.cpp, 
line 139.

Riki

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20240122/17e81adf/attachment.html>


More information about the lyx-devel mailing list