HaxeFoundation / HaxeFoundation/haxe
[CPP] `Sys.getCwd()` returns wrong path if the path contains non-ascii chars
Open
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Following this openfl/lime/issues/1757 issue, I though I found a workaround, but it didn't work for cpp.
So, Lime structures get incorrect path to assets and the app crashes. Using `Sys.getCwd()` to get the correct path worked for my case only on HL. Trying it on `cpp` I still get the crash - non-ascii path results with wrong string returned by `Sys.getCwd()`.
```haxe
trace(Sys.getCwd());
```
what it should be
```
C:\game\export\windows\я\
```
but it is
```
C:\game\export\windows\╤П\
```
As was stated in similar issue #10859, tediously telling the users how to "properly start" the app is annoying.
Contributor guide
Assessment
This issue has not been assessed yet.