[MacRuby] #1295: A bug in NSMutableString#sub! with non ASCII chars
#1295: A bug in NSMutableString#sub! with non ASCII chars ----------------------------------+----------------------------------------- Reporter: yasuimao@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- A bug with NSMutableString#sub!. Characters are corrupted when replaced with non-ASCII characters. This does not happen with 'gsub!' nor 'sub/gsub'. And as pointed out by Vincent, this also happens with 'self[]'. Here's the code written by Vincent. {{{ framework 'Cocoa' s1 = NSMutableString.stringWithString("this is a test script.") s1.sub!(/test/, "あ") puts s1 #=> this is a  ̄チツ script. s2 = NSMutableString.stringWithString("this is a test script.") s2[10..14] = "あ" puts s2 #=> this is a  ̄チツ script. }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1295> MacRuby <http://macruby.org/>
#1295: A bug in NSMutableString#sub! with non ASCII chars ----------------------------------+----------------------------------------- Reporter: yasuimao@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by vincent.isambart@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: should be fixed by https://github.com/MacRuby/MacRuby/commit/b1f457a7533d27cc2945f0472d19583811... -- Ticket URL: <http://www.macruby.org/trac/ticket/1295#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby