[MacRuby] #879: open-uri/stringio throw enoding errors
#879: open-uri/stringio throw enoding errors -----------------------------------+---------------------------------------- Reporter: smparkes@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- {{{ require 'open-uri' open("http://subefotos.com") { |f| p f.content_type, f.charset, f.read.encoding } }}} generates {{{ incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError) }}} The page is iso-8859-1 and has the correct header. -- Ticket URL: <http://www.macruby.org/trac/ticket/879> MacRuby <http://macruby.org/>
#879: open-uri/stringio throw enoding errors -----------------------------------+---------------------------------------- Reporter: smparkes@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by watson1978@…): I guess that this issue is reproduction of #849. -- Ticket URL: <http://www.macruby.org/trac/ticket/879#comment:1> MacRuby <http://macruby.org/>
#879: open-uri/stringio throw enoding errors -----------------------------------+---------------------------------------- Reporter: smparkes@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by smparkes@…): It's possible, but I did look at #849 and it looked rather pack-specific. Beyond that, I'm not sure. -- Ticket URL: <http://www.macruby.org/trac/ticket/879#comment:2> MacRuby <http://macruby.org/>
#879: open-uri/stringio throw enoding errors -----------------------------------+---------------------------------------- Reporter: smparkes@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by lsansonetti@…): I believe the exception is being raised from stringio.rb's #syswrite which calls String#<<. The receiver is UTF-8 but the argument is BINARY. -- Ticket URL: <http://www.macruby.org/trac/ticket/879#comment:3> MacRuby <http://macruby.org/>
#879: open-uri/stringio throw enoding errors -----------------------------------+---------------------------------------- Reporter: smparkes@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by smparkes@…): It works in 1.8.7 and 1.9.2. I thought about digging in a little but thought I'd check here first to see if it was likely to be insanely hard. I have the overall impression encoding issues are tricky in macruby? -- Ticket URL: <http://www.macruby.org/trac/ticket/879#comment:4> MacRuby <http://macruby.org/>
#879: open-uri/stringio throw enoding errors -----------------------------------+---------------------------------------- Reporter: smparkes@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by lsansonetti@…): Yeah, the encoding stuff in MacRuby is still a bit fragile. Thanks for reporting this problem to us. It definitely looks like a MacRuby bug. -- Ticket URL: <http://www.macruby.org/trac/ticket/879#comment:5> MacRuby <http://macruby.org/>
#879: open-uri/stringio throw enoding errors -----------------------------------+---------------------------------------- Reporter: smparkes@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: Should be fixed in r4484. -- Ticket URL: <http://www.macruby.org/trac/ticket/879#comment:6> MacRuby <http://macruby.org/>
#879: open-uri/stringio throw enoding errors -----------------------------------+---------------------------------------- Reporter: smparkes@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Comment(by smparkes@…): Confirmed. Thanks! -- Ticket URL: <http://www.macruby.org/trac/ticket/879#comment:7> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby