Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Exotic locale leads to text encoding exceptions #24

Open
fghzxm opened this issue Feb 11, 2020 · 0 comments
Open

Exotic locale leads to text encoding exceptions #24

fghzxm opened this issue Feb 11, 2020 · 0 comments

Comments

@fghzxm
Copy link

fghzxm commented Feb 11, 2020

Trying to use gitrev on Windows displaying an East Asian language results in an I/O exception (taken from the build output of haskell-ide-engine):

ormolu            > app\Main.hs:102:11: error:
ormolu            >     • Exception when trying to run compile-time code:
ormolu            >         fd:5: hGetContents: invalid argument (invalid byte sequence)
ormolu            >       Code: gitBranch
ormolu            >     • In the untyped splice: $gitBranch
ormolu            >     |
ormolu            > 102 |         , $gitBranch
ormolu            >     |           ^^^^^^^^^^
ormolu            >

... which is worked around by setting LANG=en_US.UTF8.

(This is weird to me in that, obviously gitrev should not depend on any locale-dependent output of git, should it? And if all git outputs is locale-independent text, then the text should not trigger encoding problems since Windows code page encodings are compatible with ASCII.)

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant