Ticket #94 (closed defect: fixed)
Bug with non-ASCII in the regular expressions
| Reported by: | vincent.isambart@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | blocker | Milestone: | MacRuby 0.5 |
| Component: | MacRuby | Keywords: | |
| Cc: |
Description
The following code source displays correctly "あ" in both 1.9 and 1.8 but it wrongly displays "" in MacRuby. I think the reason is that the regexps created with Oniguruma are always created with an ASCII encoding in MacRuby (shouldn't it be UTF-8 as all source code files are handled as UTF-8?).
# encoding: utf-8 version = RUBY_VERSION.sub(/(\d+\.\d+)\.\d+/, '\1').to_f $KCODE = 'u' if version <= 1.8 # remove the warning we get in 1.9 for using $KCODE m = /あ/.match('あ') p m[0]
Change History
Note: See
TracTickets for help on using
tickets.

