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

Always encode gethostname result as UTF-8 #6274

Merged
merged 1 commit into from Jun 15, 2020

Conversation

headius
Copy link
Member

@headius headius commented Jun 9, 2020

Our gethostname backends on the JDK's socket API, which always
returns a decoded character string. Rather than try to pretend
that this decoding has not happened and stuff the string back into
a "binary" ASCII-8BIT string, we instead always normalize the
encoding to UTF-8, the default encoding for Ruby strings now.

Fixes #6156

Our gethostname backends on the JDK's socket API, which always
returns a decoded character string. Rather than try to pretend
that this decoding has not happened and stuff the string back into
a "binary" ASCII-8BIT string, we instead always normalize the
encoding to UTF-8, the default encoding for Ruby strings now.

Fixes jruby#6156
@headius headius added this to the JRuby 9.3.0.0 milestone Jun 9, 2020
@headius headius merged commit 0742c00 into jruby:master Jun 15, 2020
@headius headius deleted the utf8_hostname branch June 15, 2020 21:48
@headius headius modified the milestones: JRuby 9.3.0.0, JRuby 9.2.18.0 Jun 8, 2021
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

Successfully merging this pull request may close these issues.

Socket.gethostname encoding still platform specific
1 participant