I
Idan Miller
Hi everyone,
I'm trying to get ruby to run a script that has a hebrew string.
I'm using a string with just one letter - aleph, the first in the
hebrew alphabet.
This code:
a = "×"
that I write using SciTE and saved as UTF-8 gives these errors:
C:/Documents and Settings/idan/Desktop/test.rb:1: Invalid char `\357'
in expression
C:/Documents and Settings/idan/Desktop/test.rb:1: Invalid char `\273'
in expression
C:/Documents and Settings/idan/Desktop/test.rb:1: Invalid char `\277'
in expression
Now, if I save this as ANSI in SciTE it allows it, and then it runs.
However, if I use eclipse ruby plugin, it won't allow me to save aleph
as ANSI (rightfully).
Also, if I read aleph from a file everything works fine when the ruby
script is UTF-8.
What is wrong here?
Can ruby just not get strings in the code that aren't ANSI?
Thanks,
Idan Miller.
I'm trying to get ruby to run a script that has a hebrew string.
I'm using a string with just one letter - aleph, the first in the
hebrew alphabet.
This code:
a = "×"
that I write using SciTE and saved as UTF-8 gives these errors:
C:/Documents and Settings/idan/Desktop/test.rb:1: Invalid char `\357'
in expression
C:/Documents and Settings/idan/Desktop/test.rb:1: Invalid char `\273'
in expression
C:/Documents and Settings/idan/Desktop/test.rb:1: Invalid char `\277'
in expression
Now, if I save this as ANSI in SciTE it allows it, and then it runs.
However, if I use eclipse ruby plugin, it won't allow me to save aleph
as ANSI (rightfully).
Also, if I read aleph from a file everything works fine when the ruby
script is UTF-8.
What is wrong here?
Can ruby just not get strings in the code that aren't ANSI?
Thanks,
Idan Miller.