[MacRuby-devel] [MacRuby] #116: "%s" inside of format statements in macruby doesn't work with multibyte characters

MacRuby ruby-noreply at macosforge.org
Fri Aug 29 13:07:35 PDT 2008


#116: "%s" inside of format statements in macruby doesn't work with multibyte
characters
-------------------------------------+--------------------------------------
 Reporter:  jordan.breeding at mac.com  |       Owner:  lsansonetti at apple.com
     Type:  defect                   |      Status:  new                  
 Priority:  blocker                  |   Milestone:                       
Component:  MacRuby                  |    Keywords:                       
-------------------------------------+--------------------------------------
 this:

 {{{
 printf("straight puts: ")
 puts(p["name"])
 printf("straight printf: ")
 printf("%s\n", p["name"])
 printf("string formatted puts: ")
 puts("%s" % [p["name"]])
 printf("nsstring printf: ")
 printf("%@\n", p["name"])
 printf("nsstring formatted puts: ")
 puts("%@" % [p["name"]])
 printf("format using nsstring, then puts: ")
 puts(NSString.stringWithFormat("%@", p["name"]))
 }}}

 will produce this:

 {{{
 straight puts: Surgeon’s Girl
 straight printf: Surgeon’s Girl
 string formatted puts: Surgeon’s Girl
 nsstring printf: Surgeon’s Girl
 nsstring formatted puts: Surgeon’s Girl
 format using nsstring, then puts: Surgeon’s Girl
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/116>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list