Reputation: 494
I have a feeling that this has already been answered somewhere: if so I apologise.
I am trying to use an executable that writes Unicode characters to standard output. All I get is this error message (hPutChar from Haskell):
<stderr>: hPutChar: invalid argument (invalid character)
Just to be clear: the executable is not mine, I cannot change what it outputs.
Is there some way to get bash to display these characters? My bash version is 4.3.30 on Debian Jessie.
Thanks very much.
Upvotes: 0
Views: 408
Reputation: 120079
Your user environment is not set up correctly to handle Unicode. Your locale should be set to <language>_<territory>.utf-8
or some spelling variation thereof (some systems use UTF8 or utf8). Type locale -a
to see a list of supported locales. Type
export LANG=<your preferred locale name>
and run your progran again. The program should stop complaining. If you don't see correct characters, and you are running X11, type xterm&
(or whatever terminal emulator you prefer) in the same session, and try again.
If there are no suitable locales, you may need to generate some. This seem to explain how to do that on Debian.
Upvotes: 3