#700: Escaped Unicode chars in hex are not recogized ----------------------------+----------------------------------------------- Reporter: jazz...@… | Owner: lsansone...@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: invalid Keywords: unicode | ----------------------------+-----------------------------------------------
Comment(by jazz...@…): Hi, I didn't rely on Ruby 1.9 because of this: {{{ $ ruby1.9 -e 'require "yaml"; puts "Rübe".to_yaml' --- "R\xC3\xBCbe" }}} If you look at Ticket #339 you will see, that neeracher told me that Ruby 1.9 is completely wrong in this case. Now I am confused a little bit. If you are right, the following is definitely wrong! (with MacRuby 0.7 nightly-latest): {{{ $ macruby -r 'yaml' -e 'puts "Rübe".to_yaml' --- "R\xFCbe" }}} That's the way I came to the "R\xFCbe"! I then tried to repair this wrong YAML with an eval: {{{ $ macruby -r 'yaml' -e 'puts "Rübe".to_yaml.gsub(/"([ a-zA-Z0-9\\]*)"/) { |m| eval(m) }' --- R?be }}} while Ruby 1.9 seems to be OK here: {{{ $ ruby1.9 -r 'yaml' -e 'puts "Rübe".to_yaml.gsub(/"([ a-zA-Z0-9\\]*)"/) { |m| eval(m) }' --- Rübe }}} I think, ticket #339 should be reopened! What do you think? -- Ticket URL: <http://www.macruby.org/trac/ticket/700#comment:2> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel