Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

?? instead of chars like á,é,ő,ű etc. in irb #2204

Closed
Allanon29 opened this issue Nov 15, 2014 · 5 comments
Closed

?? instead of chars like á,é,ő,ű etc. in irb #2204

Allanon29 opened this issue Nov 15, 2014 · 5 comments

Comments

@Allanon29
Copy link

Hi Guys,

I need to be able to show the chars in the title properly in irb however right now it displays only ?? instead.
OS: Centos 7, but the same thing happens on Centos 6.5
The encoding of the OS is set to hu_HU.utf8
I also tried to encoding external, and encoding internal in .jrubyrc to UTF-8 and 8859-2 but the issue is still the same.
I tried ruby 2.1.5 and this issue is not present there. It shows the chars properly.

Is this a bug?

@headius
Copy link
Member

headius commented Nov 15, 2014

Can you try a JRuby 9k nightly please? I was able to print out multibyte characters ok on OS X with your LANG setting.

@Allanon29
Copy link
Author

On OS X it works for me too, even with 1.7.16 and 1.7.16.1 but on Centos 6, 7 it doesn't.
I've just tried it with jRuby 9k but the issue is the same on Centos.

This is my local output on Centos:
locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r LANG=hu_HU.utf8 LC_CTYPE=UTF-8 LC_NUMERIC="hu_HU.utf8" LC_TIME="hu_HU.utf8" LC_COLLATE="hu_HU.utf8" LC_MONETARY="hu_HU.utf8" LC_MESSAGES="hu_HU.utf8" LC_PAPER="hu_HU.utf8" LC_NAME="hu_HU.utf8" LC_ADDRESS="hu_HU.utf8" LC_TELEPHONE="hu_HU.utf8" LC_MEASUREMENT="hu_HU.utf8" LC_IDENTIFICATION="hu_HU.utf8" LC_ALL=

@Allanon29
Copy link
Author

Ok. Problem solved.
Needed to put this inside /etc/environment
LC_ALL=hu_HU.utf8
LANG=hu_HU.utf8

@headius
Copy link
Member

headius commented Nov 17, 2014

So there's still a bug here...we're not adequately determining your locale.

I believe we're just using the JVM's own locale detection for this, so it's possible the JVM is actually to blame.

A few points...

  1. You needed both of those env vars for it to work?
  2. Can you please provide a full text capture of your IRB session and ENV (suitably scrubbed of sensitive data)?

If we have a behavioral difference from MRI, we need to figure it out.

@headius
Copy link
Member

headius commented Apr 12, 2019

No followup since 2016, but likely fixed by @enebo's symbol work last year. Calling it invalid, since there were other more specific bugs also fixed by that work.

@headius headius closed this as completed Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants