Actions
Bug #7593
closedFile encoding needs to be specified when using {Katakana} character property
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.0.0]
Backport:
Description
Creating a file with only the following line in it:
/\p{Katakana}/
will raise the error
katakana.rb:1: invalid character property name {Katakana}: /\p{Katakana}/
This can be resolved by specifying
encoding: UTF-8¶
However, it was not obvious to me that this was needed.
Updated by naruse (Yui NARUSE) almost 12 years ago
- Status changed from Open to Rejected
On 1.9.3, default source encoding is US-ASCII.
Regexp escape \p{foo} in US-ASCII is interpreted as POSIX character class foo.
In this case, US-ASCII doesn't have POSIX character class Katakana, so this will raise error.
On 2.0.0, default source encoding becomes UTF-8.
So this won't happen.
Actions
Like0
Like0