Hello, I am trying to convert french characters into latin ones using inconv but I face some problems. Here is what I am doing in ruby console:>> $KCODE = ''u''=> "u">> @x = ''x éèçà x''=> "x éèçà x">> Iconv.new(''US-ASCII//TRANSLIT'', ''utf-8'').iconv @x=> "x ???? x" And I expect "x eeca x" as output. ruby --version returns: ruby 1.8.2 (2005-04-11) [i386-linux] iconv --version returns: iconv (GNU libiconv 1.11) Copyright (C) 2000-2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Bruno Haible. Maybe somebody knows where is the problem? -- Best wishes, Justas Janauskas -- 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 -~----------~----~----~----~------~----~------~--~---
Well, anyone? :) -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3/28/07, Justas Janauskas <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hello, > > I am trying to convert french characters into latin ones using inconv > but I face some problems. > > Here is what I am doing in ruby console: > > >> $KCODE = ''u'' > => "u" > >> @x = ''x éèçà x'' > => "x éèçà x" > >> Iconv.new(''US-ASCII//TRANSLIT'', ''utf-8'').iconv @x > => "x ???? x" > > And I expect "x eeca x" as output.I''m using ruby 1.8.6 and I get "x ''e`ec`a x" as my result. Wish I could help, but this is really more of a ruby question. Iconv is a ruby standard lib. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.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 -~----------~----~----~----~------~----~------~--~---