Project

General

Profile

Actions

Bug #4549

closed

Can't start class names with non us-ascii chars

Added by carl.hoerberg (Carl Hörberg) about 11 years ago. Updated about 11 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p180 (2011-02-18) [i386-cygwin]
Backport:
[ruby-core:<unknown>]

Description

=begin
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 `'

=end

Actions #1

Updated by carl.hoerberg (Carl Hörberg) about 11 years ago

=begin
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 `'

=end

Updated by naruse (Yui NARUSE) about 11 years ago

  • Status changed from Open to Rejected

=begin
It is because Å is not a uppercase letter.
=end

Updated by carl.hoerberg (Carl Hörberg) about 11 years ago

=begin
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..
=end

Updated by naruse (Yui NARUSE) about 11 years ago

=begin
Use decomposed string. In this case,

class A\u030Aa\u0308o\u0308
end

Ruby considers it is begin with ASCII uppercased character: constant.
=end

Actions

Also available in: Atom PDF