From: Yui NARUSE Date: 2010-09-16T21:28:20+09:00 Subject: [ruby-core:32427] [Ruby 1.9-Bug#3838] regexp for unicode property under windows Issue #3838 has been updated by Yui NARUSE. \p{Lu} and \p{Han} is Unicode Property for Unicode regexps. Where the locale is not UTF-8, the encoding of regexp literal given from irb is that encoding. It means the regexp literal's encoding is not UTF-8 (Windows-1252 for example on English version of Windows). You can avoid this problem by explicitly specify the encoding as UTF-8 by /u modifier like: % echo $LANG C % ~/local/ruby/bin/irb irb(main):001:0> /\p{Lu}/ SyntaxError: (irb):1: invalid character property name {Lu}: /\p{Lu}/ from /home/naruse/local/ruby/bin/irb:12:in `
' irb(main):002:0> /\p{Lu}/u => /\p{Lu}/ ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3838 ---------------------------------------- http://redmine.ruby-lang.org