Forum: Ruby on Rails Help with fastercsv

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Francis S. (Guest)
on 2007-01-30 01:19
Hi,

I have this line in a csv file ==>  Rüti,CH
and Fastercsv takes them as one and not as separate strings.
Other entries are ok except for this.

Any help would be appreciated.

Thanks,
franee
Bill W. (Guest)
on 2007-01-30 03:20
(Received via mailing list)
Hi Francis,

Francis S. wrote:

> I have this line in a csv file ==>  Rüti,CH
> and Fastercsv takes them as one and not
> as separate strings.

Have you tried eliminating the punctuation?  Just to see if it would
make a
difference?

Bill
Francis S. (Guest)
on 2007-02-01 22:52
Bill W. wrote:
> Hi Francis,
>
> Francis S. wrote:
>
>> I have this line in a csv file ==>  R�ti,CH
>> and Fastercsv takes them as one and not
>> as separate strings.
>
> Have you tried eliminating the punctuation?  Just to see if it would
> make a
> difference?
>
> Bill

Hi,

sorry for the late update.

I tried removing the unicode character and it works fine.
James Edward G. II (Guest)
on 2007-02-12 04:49
Francis S. wrote:
> Hi,
>
> I have this line in a csv file ==>  Rüti,CH
> and Fastercsv takes them as one and not as separate strings.
> Other entries are ok except for this.

Are you sure this is the problem?

http://pastie.caboo.se/39636

If you want to see the character as it was, you can set Ruby's $KCODE
variable before processing:

http://pastie.textmate.org/39639

Hope this helps.

James Edward G. II
Francis S. (Guest)
on 2007-02-12 13:29
James Edward G. II wrote:
> Francis S. wrote:
>> Hi,
>>
>> I have this line in a csv file ==>  Rüti,CH
>> and Fastercsv takes them as one and not as separate strings.
>> Other entries are ok except for this.
>
> Are you sure this is the problem?
>
> http://pastie.caboo.se/39636
>
> If you want to see the character as it was, you can set Ruby's $KCODE
> variable before processing:
>
> http://pastie.textmate.org/39639
>
> Hope this helps.
>
> James Edward G. II

Thanks:) it was the file not being encoded in utf8 that was the source
of the problem.  It took awhile to figure out since it was correctly
displaying unicode characters even with the ascii setting in notepad++.

Works smoothly now:) thanks:)
This topic is locked and can not be replied to.