otfried / ipe

The Ipe extensible drawing editor
http://ipe.otfried.org
125 stars 9 forks source link

Will not launch when accented characters are in the path #467

Closed Gallion closed 11 months ago

Gallion commented 1 year ago

On windows, Ipe will not launch if accented characters are in the path. For example, Ipe was under this path "C:\Users\MiniPC\Documents\Ecole\ipe-7.2.27\bin" and nothing would happen when double-clicking it. Changing "École" to "Ecole" fixed the issue.

otfried commented 1 year ago

What operating system are you using exactly? Windows 10? The file system is formatted with NTFS?

Gallion commented 1 year ago

Yes to both! More precisely, this is on Windows 10 LTSC 21H2.

otfried commented 1 year ago

I thought this is a regression, but on closer look it turns out this must always have been the case. Unlike the fully Unicode-aware filesystem access functions in Ipe itself, Lua simply uses fopen to open Lua files - it cannot understand the UTF-8-encoded filenames that Ipe uses.

I could try to convert the path to the "code page" of the Windows system, but that would also break when the path uses characters that cannot be represented in this code page. Perhaps it would be better if Ipe simple warned the user when the path is not clean ASCII.