[macruby] #66: Death by Iconv
#66: Death by Iconv -----------------------------------------+---------------------------------- Reporter: rowland@rowlandresearch.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------------+---------------------------------- The following script goes into a spin and must be killed (MacRuby 0.2): {{{ Shiny:eideticpdf brent$ cat iconvtest.rb require 'iconv' ic = Iconv.new('UCS-2BE', 'ASCII') ic.close Shiny:eideticpdf brent$ macruby iconvtest.rb dyld: lazy symbol binding failed: Symbol not found: _rb_enc_find_index Referenced from: /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/1.9.0 /universal-darwin9.0/iconv.bundle Expected in: flat namespace dyld: Symbol not found: _rb_enc_find_index Referenced from: /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/1.9.0 /universal-darwin9.0/iconv.bundle Expected in: flat namespace Killed }}} -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/66> macruby <http://ruby.macosforge.org/>
#66: Death by Iconv -----------------------------------------+---------------------------------- Reporter: rowland@rowlandresearch.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -----------------------------------------+---------------------------------- Changes (by lsansonetti@apple.com): * milestone: => MacRuby 1.0 Comment: Due to the new important changes in String, it is not easy to port Iconv. Let's do this later. Anyway, most (if not all?) of the iconv functionality should exist in String itself now. -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/66#comment:1> macruby <http://ruby.macosforge.org/>
#66: Death by Iconv -----------------------------------------+---------------------------------- Reporter: rowland@rowlandresearch.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -----------------------------------------+---------------------------------- Comment (by rowland@rowlandresearch.com): Okay. For now I'll try to implement a simple compatibility layer using the Cocoa API so I can test the remainder of my library. Sorry to be lazy, what's the recommended way to detect MacRuby to implement version-specific behavior? -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/66#comment:2> macruby <http://ruby.macosforge.org/>
#66: Death by Iconv -----------------------------------------+---------------------------------- Reporter: rowland@rowlandresearch.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -----------------------------------------+---------------------------------- Comment (by lsansonetti@apple.com): Currently this isn't very easy, but it should be better once RUBY_ENGINE is introduced in all implementations. You can still try to compare one of the values in rbconfig.rb, in the meantime. Example: {{{ $ macruby -r rbconfig -e "p RbConfig::CONFIG['RUBY_INSTALL_NAME'] == 'macruby'" true }}} Curiously, why do you need Iconv? If it's to create or translate strings using a given encoding, you may want to use the String API instead, even in pure 1.9. Then, your code would only use Iconv for 1.8. -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/66#comment:3> macruby <http://ruby.macosforge.org/>
participants (1)
-
macruby