[MacRuby-devel] [MacRuby] #706: YAML output for unicode chars should be the same as Ruby1.9

MacRuby ruby-noreply at macosforge.org
Wed May 12 01:44:43 PDT 2010


#706: YAML output for unicode chars should be the same as Ruby1.9
----------------------------+-----------------------------------------------
 Reporter:  jazzbox@…       |        Owner:  lsansonetti@…        
     Type:  defect          |       Status:  closed               
 Priority:  major           |    Milestone:                       
Component:  MacRuby         |   Resolution:  invalid              
 Keywords:  yaml            |  
----------------------------+-----------------------------------------------

Comment(by vincent.isambart@…):

 Ruby 1.9 is indeed the reference for most behavior, but Syck that is used
 when you do require 'yaml' on 1.9 (and even 1.9) is just very bad and does
 not respect the YAML specs.

 Ruby 1.9 now also includes a new library for YAML (psych) that does not
 have this problem.

 {{{
 % ruby1.9 -e 'require "psych"; p Psych.load("--- \"R\\xC3\\xBCbe\"")'
 "Rübe"
 % ruby1.9 -e 'require "psych"; p Psych.load("--- \"R\\xFCbe\"")'
 "Rübe"
 }}}

 In fact psych does not even escape the "ü".
 {{{
 % ruby1.9 -e 'require "psych"; puts "Rübe".to_yaml'
 --- Rübe
 ...
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/706#comment:4>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list