google / google/brotli

Output file with path containing non-Latin Unicode characters on Windows

Open
#1,133 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
14.9k
Forks
1.4k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

I've noticed some unusual behavior on Windows with output file paths containing non-Latin Unicode characters:

### Non-Latin characters in the output filename
```
$ brotli.exe -o "Lietuvių Kalbos Žodynu.br" "Hello.txt"
```
The command works, but the output filename is `Lietuviu Kalbos Žodynu.br`, not `Lietuvių Kalbos Žodynu.br`, as expected. (notice "u" versus "ų")

### Non-Latin characters in the name of the directory containing the output file
```
$ brotli.exe -o "Lietuvių Kalbos Žodynu\Hello.br" "Hello.txt"
```
the command fails with output:
```
failed to open output file [Lietuviu Kalbos Äodynu\Hello.br]: No such file or directory
```

By contrast, using these same non-Latin characters in the input path seems to work fine. And the problem doesn't seem to occur on MacOS.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.