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#defThe 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++.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement