Projects

Ticket #124 (closed defect: invalid)

Opened 23 months ago

Last modified 22 months ago

rb_nibtool cannot parse Korean (or UTF-8 letters)

Reported by: nineclue@… Owned by: lsansonetti@…
Priority: blocker Milestone:
Component: MacRuby Keywords:
Cc:

Description

I'm using OSX 10.5.4, XCode 3.1 and MacRuby 0.3 When I enter some Korean letters into the code, rb_nibtool cause error. I'm not sure if it's related to encoding problems but I entered "# encoding : UTF-8" anyway.

Attachments

mycontroller.rb Download (137 bytes) - added by nineclue@… 23 months ago.

Change History

Changed 23 months ago by nineclue@…

Changed 23 months ago by lsansonetti@…

What kid of error do you get when running rb_nibtool on your file?

In my environment, rb_nibtool seems to work with a file that contains multibyte characters.

$ cat /tmp/t2.rb 
# ひらがな
class Foo
  attr_writer :foo
  def click(sender)
    puts "ありがとう"
  end
end
$ /Developer/usr/bin/rb_nibtool -f /tmp/t2.rb 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>IBClasses</key>
	<array>
		<dict>
			<key>ACTIONS</key>
			<array>
				<string>click</string>
			</array>
			<key>CLASS</key>
			<string>Foo</string>
			<key>LANGUAGE</key>
			<string>Ruby</string>
			<key>OUTLETS</key>
			<array>
				<string>foo</string>
			</array>
			<key>SUPERCLASS</key>
			<string>NSObject</string>
		</dict>
	</array>
</dict>
</plist>
$ 

The #encoding: line is not needed in MacRuby, by default all files will be parsed as unicode content.

Changed 23 months ago by lsansonetti@…

Also, you may want to check if the encoding of your file is UTF-8. In my case:

$ file /tmp/t2.rb 
/tmp/t2.rb: UTF-8 Unicode C++ program text

Changed 22 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to invalid

Closing.

Note: See TracTickets for help on using tickets.