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

**URL:** <https://www.ruby-forum.com/t/newbie-question-working-with-iso-8859-1-files-in-ruby/100240>\
**Category:** Ruby\
**Created:** [July 27, 2006, 11:07pm UTC](https://www.ruby-forum.com/t/newbie-question-working-with-iso-8859-1-files-in-ruby/100240 "2006-07-27T23:07:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterkemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Post date:** [July 27, 2006, 11:07pm UTC](https://www.ruby-forum.com/t/newbie-question-working-with-iso-8859-1-files-in-ruby/100240/1 "2006-07-27T23:07:50Z")

</div>

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
