You are not logged in.

#1 2015-06-02 19:35:26

Bailando
Member
From: Hungary
Registered: 2013-08-19
Posts: 133
Website

What should I set up in locale.conf to avoid conversion errors?

When I try to use my Ruby script I always get a "invalid byte sequence in US-ASCII (ArgumentError) exception". I managed to track down that program arguments are passed in US-ASCII encoding. However Ruby scripts are using strings with UTF-8 encoding. Formerly those Ruby scripts worked fine, and I found out they keep working if I explicitly convert program arguments (passed as ARGV[]) to UTF-8 encoding.

I think I have "locale" problems. Maybe I should set up LC_CTYPE somewhere in the config files.
When I issue command "locale -a" I see:

C
POSIX
en_US.utf8
hu_HU.utf8

/etc/locale.conf

LANG=en_EN.UTF-8
LANGUAGE=en_EN.UTF-8
LC_CTYPE=en_EN.UTF-8

However I added the last line recently, and I don't know how to "source" this kind of file, to manifest their content.

Offline

#2 2015-06-02 20:02:48

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: What should I set up in locale.conf to avoid conversion errors?

As far as I know, the locale / LANG setting en_EN.* does not exist, at least it does not appear in my /etc/locale.gen.
You probably want en_{US,GB}.UTF-8 (or anything else from /etc/locale.gen)

Though, I am not sure whether this is related to your problem, since 'locale -a' gives correct output.

Last edited by respiranto (2015-06-02 20:18:07)

Offline

#3 2015-06-02 20:39:26

Bailando
Member
From: Hungary
Registered: 2013-08-19
Posts: 133
Website

Re: What should I set up in locale.conf to avoid conversion errors?

Thx, this explains everything.

Offline

#4 2015-06-02 22:11:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: What should I set up in locale.conf to avoid conversion errors?

Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

Board footer

Powered by FluxBB