[Issue 23508] Unable to build japanese named source files

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 25 11:32:51 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23508

--- Comment #7 from FeepingCreature <default_357-line at yahoo.de> ---
Yeah this is definitely a DMD bug. 

Data flow:

Identifier (UTF) -> 
getFilename -> 
FileManager.lookForSourceFile ->
FileName.exists -> 
extendedPathThen -> 
toWStringz treats string as default codepage, not UTF -> 
GetFileAttributesW (UTF treated as CA_ACP transcoded to UTF-16) -> 
error.

To reproduce, would be something like:

- have a Windows computer
- Settings, Region and Language, Administrative, Language for non-Unicode
programs
- Select a language whose encoding is not compatible with UTF-8
- Compile file that imports module with non-ASCII UTF characters.

--


More information about the Digitalmars-d-bugs mailing list