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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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? > > BillHi, sorry for the late update. I tried removing the unicode character and it works fine. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 IIThanks:) 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:) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---