International characters
-
I am trying to work out how to support Extended Ansi characters in ruby.
I can execute these two statements from the ruby console:
satt1 = "Grösse" satt2 = "Größe"
(The first word doens't exist but it highlights that the umlauted-o works, but not the double-SS character)
But when I include them in ruby source, the second will not load into Ruby.
def test_att1 satt1 = "Grösse" printf("SATT1; %s\n",satt1) end#def def test_att2 satt2 = "Größe" printf("SATT2; %s\n",satt2) end#def
The word Größe is stored in the source file as extended Ascii: (hex) 47 72 94 E1 65
Is there a way to convert extended Ascii to multi-byte characters and/or can I switch to using Unicode?
I am using MSVC for my ruby editor - is there a way to enter accented characters better in MSVC?
-
This happens with French accents as well (I am using Notepad++ as my Ruby editor).
The method is to prefix the special character with a backslash within the string.
For instance "Gr\ö\βe" -
Thanks.
That worked and also create a multi-byte string, rather than an extended ansi string.
-
This is normal. For German characters, you do not need Unicode. So you should swith it off.
For MSVC, I don't know if there is an efficient way to enter the extra characters. I am personally using Notepad++.
Advertisement