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
Psych yaml parser can not parse uppercase ÄÖÜ but äöü can parse #483
Comments
On my Mac i have the Oracle Java version and it works but not on my Ubuntu server with OpenJDK ;-(
|
Can you check your system encoding (e.g., |
I am a little confused how this should work. The File.open.read will read in the file with a particular encoding and YAML expects it to be one of the two UTF-16's or UTF-8. So what happens if your default encoding is not UTF-* on the read? If it is ascii or the ascii-8bit (accented chars) ends up being valid UTF-* characters then you should see this error. I guess that could explain the error if as Hiro suggests your encoding is not UTF-8 on Ubuntu (LANG is also worth checking). |
locale
It also does not work with enforcing UTF-8
|
I still can't reproduce this. There is something else at play. Could you try without RVM?
|
I have a similar problem, but with translations (YAML files) from a 3rd party service. The file is downloaded and the characters appear as <80>, <88> when I open them with vim. I tried to reproduce the test case from the author and everything works for me, so I suspect that maybe it depends on the source encoding of the YAML file... |
My problem is related to the encoding set from RestClient(possibly Net::HTTP) on file attachments. The CRuby (1.9.3-p374) differs from the JRuby's one in my case. CRuby will set the Now I'm unsure if this is actually a bug and in which cases it happens as I have no understanding how Net:HTTP should behave when downloading files as I'm not aware what the HTTP specification says about encoding in this cases. I couldn't reproduce the the exact behavior on public domain and it seems it happens on specific server responses. So in some cases, unknown to me, the server can specify the file encoding and in the CRuby acknowledge it. If someone knows more on this subject I'm happy to discuss it further, so I can isolate a specific case. |
I think there's an encoding mismatch at play here. None of us can reproduce this, and one commentor theorized it could be an issue with a badly-encoded YAML source. When the file is encoded as UTF-8 and read as UTF-8, it appears to parse just fine. If you can find a way for us to reproduce this, feel free to reopen. |
I encountered the same issue. I'm sending a YAML dump with an Ü from MRI ruby v2.2.3 to a torquebox v3.1.2 with jruby v1.7.8 via an API call (java version is 1.8.0_91-b14) . Upgrading to torquebox v3.2.0 with jruby v9.1.5.0 solved the issue Locale info : |
My Env
With jruby 1.7.2 it does also not work, bit it works with the normal MRI ;-(
How to reproduce the bug
test.yml
test.rb
Error
Someone knows a workaround?
The text was updated successfully, but these errors were encountered: