Overview
| Artifact ID: | b9a63bd41e15e71d21b204c66d8c79ffa3adf461a8e6dfe71b1fb724e1e8e2a5 |
|---|---|
| Ticket: | 43b065660532eb4a3678e70e9d68daf1b09810ac
MS Windows: files with emojis are found by glob but not recognized by file exists or open |
| User & Date: | jan.nijtmans on 2023-09-11 08:25:53 |
Changes
- icomment:
The problem is [https://core.tcl-lang.org/tcl/file?name=win/tclWinFile.c&ci=934bc954efa31e2d&ln=3094-3108|here]. The function MultiByteToWideChar() converts UTF-8 to UTF-16, but - in this case - the filename is not in UTF-8, it's CESU-8, because that's the encoding used internally in Tcl 8.6. In Tcl 8.7 and 9.0, Tcl uses (modified) UTF-8 in stead of CESU-8, that explains why it works there. Possible solution, convert from CESU-8 to UTF-8 (Tcl_UtfToExternal) first.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"