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.
917533d6bb5803079146c8bfb16d58b6?d=identicon&s=25 Francis Sinson (franee)
on 2007-01-30 00: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
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2007-01-30 02:20
(Received via mailing list)
Hi Francis,

Francis Sinson 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
917533d6bb5803079146c8bfb16d58b6?d=identicon&s=25 Francis Sinson (franee)
on 2007-02-01 21:52
Bill Walton wrote:
> Hi Francis,
>
> Francis Sinson 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.
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Edward Gray II (Guest)
on 2007-02-12 03:49
Francis Sinson 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 Gray II
917533d6bb5803079146c8bfb16d58b6?d=identicon&s=25 Francis Sinson (franee)
on 2007-02-12 12:29
James Edward Gray II wrote:
> Francis Sinson 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 Gray 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.