unicode in ruby
i'm using IO.foreach to parse the lines in a file. now i'm trying to get
it to work with unicode encoded files. does ruby support unicode? how do
i compare a variable with a unicode constant string?
the script goes something like:
IO.foreach("myfile.txt") { |line|
if line.downcase[0,2] == "id"
.
Relevant Pages
- Re: JSON.parse and unicode escape?
... I am running into what seems to be a related problem with the ... I don't know enough about unicode to really understand what is being ... (comp.lang.ruby) - Re: Anyway to designating the encoding of the "source" for compile?
... > app) is decode your user input into Unicode (you *don't* need to ... (comp.lang.python) - How to open registry file both ASCII and Unicode versions
... ASCII REGEDIT4 and unicode regedit 5 formats) and parse the file for my ... The project is not and cannot be built as unicode. ... (microsoft.public.vc.mfc) - Re: quoted-printable characters
... This is where I got into trouble. ... I can't seem to find any way to parse EVERYTHING to Unicode. ... For additional commands, e-mail: beginners-help@xxxxxxxx ... (perl.beginners) - Re: Filename Encoding Help
... If this file is opened on a Windows with a mismatching system code page, ... if you can parse the first line and get the code page. ... You can then use that to conver to Unicode. ... So you will be able to use a Japanese-encoded file even on a Korean ... (microsoft.public.dotnet.framework) |
|