[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Newbie question: Working with iso-8859-1 files in Ruby

Peter Krantz

7/27/2006 9:07:00 PM

Hi!

I am trying to load and parse text files with various encodings. Some
are iso-8859-1, some are pure ASCII and others utf-8. None of them
contain characters not available in iso-8859-1. What is a good
strategy to use when working with the standard string methods in Ruby
on these files? Upcase, for example, seems to ignore higher order
characters in iso-8859-1.

In irb:

> s = "hellö"
> s.upcase == "HELLÖ"
=> false

Kind regards,

Peter