yeison / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
Apache License 2.0
0 stars 0 forks source link

Does not correctly parse escaped UTF-8 charcters #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The (already existing) test file 
http://code.google.com/p/snakeyaml/source/browse/src/test/resources/issues/issue
56-1.yaml
contains at at line 508:
        :de: "Acetylsalicyls\xC3\xA4ure"
which should eventually resolve to the string "Acetylsalicylsäure"

Tested with yaml 1.10 and branch default on a Linux Debian Wheezy with  
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Commit  https://bitbucket.org/ngiger/snakeyaml/changeset/67e870a3feb3 contains 
a test case

Original issue reported on code.google.com by niklaus....@gmail.com on 14 Jun 2012 at 3:46

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/snakeyaml/source/detail?r=3f0435a108121fcfdb3151005ac1c
b5fb7480a6e

Original comment by py4fun@gmail.com on 15 Jun 2012 at 12:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The issue is clear now. There is no bug in SnakeYAML.

Check this test:

http://code.google.com/p/snakeyaml/source/browse/src/test/java/org/yaml/snakeyam
l/issues/issue151/EscapedUnicodeTest.java

As you can see, the incoming YAML document contains unexpected escape sequence. 
You have to either contact the YAML provider to fix the bug or manually 
re-apply all the invalid escape sequences.

By the way, do you know which version of Ruby generated this YAML ? The latest 
Ruby contains a new YAML parser which is more compatible with specs (and thus 
with SnakeYAML :)

Original comment by py4fun@gmail.com on 15 Jun 2012 at 2:17

GoogleCodeExporter commented 9 years ago
The Umlaut Problem is based on our data export being pre-UTF-8. We will try to 
change this asap.

Best
Zeno

Original comment by zdav...@gmail.com on 17 Jun 2012 at 8:05

GoogleCodeExporter commented 9 years ago

Original comment by py4fun@gmail.com on 17 Jun 2012 at 10:36