From: takuma ozawa Date: 2002-01-15T12:01:50+09:00 Subject: [ANN] WString 0.0.8 Hi, I have released WString 0.0.8. WString is a library to use Wide Characters in Ruby. Its interface is the same as Ruby String. So after creating WString object, you can use it like Ruby String. To create WString object WString.new('aaa') # converted in the default locale WString.new('aaa', 'ja_JP.eucJP') # specifying the locale 'aaa'.to_ws('ja_JP.eucJP') # for convenience It can handle a string as a sequence of characters, not bytes. ws = 'abc'.to_ws p ws[1] # => L"b" ws.each_char { |c| p c } # => L"a" L"b" L"c" In this version, almost all methods are implemented. With boost.regex, it can use Regular Expression. m = WRegexp.new('(a+)b+').match(WString.new('aaabbb')) p m[0] # => L"aaabbb" p m[1] # => L"aaa" To install $ ruby extconf.rb $ make # make site-install If you use Regular Expression, you have to compile boost.regex first. With gcc 2.X, you need STLport to compile boost.regex. See documents for details. http://www.geocities.co.jp/SiliconValley-PaloAlto/3388/wstring/README.html takuma