Bug #4549
Can't start class names with non us-ascii chars
| Status: | Rejected | Start date: | 04/02/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| ruby -v: | ruby 1.9.2p180 (2011-02-18) [i386-cygwin] |
Description
irb(main):003:0> #encoding: UTF-8 irb(main):004:0* class Åäö; end SyntaxError: (irb):4: class/module name must be CONSTANT class Åäö; end
^
from /usr/local/bin/irb:12:in `<main>'
History
Updated by carl.hoerberg (Carl Hörberg) about 1 year ago
irb(main):003:0> #encoding: UTF-8
irb(main):004:0* class Åäö; end
SyntaxError: (irb):4: class/module name must be CONSTANT
class Åäö; end
^
from /usr/local/bin/irb:12:in `<main>'
Updated by naruse (Yui NARUSE) about 1 year ago
- Status changed from Open to Rejected
It is because Å is not a uppercase letter.
Updated by carl.hoerberg (Carl Hörberg) about 1 year ago
I beg the differ! ÅÄÖ are all uppercase letters, as oppose to åäö, in the Swedish alphabet.
The problem this is occurring for us is that we can't the name the objects in your domain model correctly. We don't wan't to translate it to English because we want to communicate with our customers using their terms and not constantly have to translate back and forth..
Updated by naruse (Yui NARUSE) about 1 year ago
Use decomposed string. In this case,
class A\u030Aa\u0308o\u0308 end
Ruby considers it is begin with ASCII uppercased character: constant.