# Csv upload and utf-8?

**URL:** <https://www.ruby-forum.com/t/csv-upload-and-utf-8/82089>\
**Category:** Rails\
**Created:** [January 17, 2007, 11:39am UTC](https://www.ruby-forum.com/t/csv-upload-and-utf-8/82089 "2007-01-17T11:39:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@ram](https://www.ruby-forum.com/u/ram)\
**Post date:** [January 17, 2007, 11:39am UTC](https://www.ruby-forum.com/t/csv-upload-and-utf-8/82089/1 "2007-01-17T11:39:09Z")

</div>

```
Hi,

I need to import data from a .csv file. I use
IO.readlines(file). Everything works fine i.e.,
the data is indeed imported into my table but
there seems to be a problem with special characters
such as the german umlauts (Ã¶, Ã¤, Ã¼). After the first
occurence of such a character the rest of the value
of a column isn't stored. For example, suppose I have
a value "exÃ¤mple" then what gets stored is "ex" !!

The csv file read in is alright. I think its got something
to do with setting character encoding (once more) as utf-8?

Thanks,
Ram.
```

---

<div class="post-metadata">

**Author:** ![ram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@ram](https://www.ruby-forum.com/u/ram)\
**Post date:** [January 23, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/csv-upload-and-utf-8/82089/2 "2007-01-23T23:53:04Z")

</div>

Ram wrote:

> ```
> Hi,
> 
> I need to import data from a .csv file. I use
> IO.readlines(file). Everything works fine i.e.,
> the data is indeed imported into my table but
> there seems to be a problem with special characters
> such as the german umlauts (Ã¶, Ã¤, Ã¼). After the first
> occurence of such a character the rest of the value
> of a column isn't stored. For example, suppose I have
> a value "exÃ¤mple" then what gets stored is "ex" !!
> 
> The csv file read in is alright. I think its got something
> to do with setting character encoding (once more) as utf-8?
> 
> Thanks,
> Ram.
> 
> ```

Hi Ram,  
have you tried to use fastercvs? I have a similar problem with a cvs  
with umlauts and it reports several errors for whatever reason. Maybe  
you get yours to work…  
Torsten
