I have oracle 10g and my db is in AL32UTF8, I had install oci8 from
oracle but when i run a query the greek characters returns with ???. I
tried also with dbi but with no luck. My ruby version is 1.8.7 and my
system ubuntu 10.04. Here is my code:
require ''rubygems''
require ''unicode''
require ''iconv''
require ''oci8''
require ''jcode''
conn = OCI8.new(''user'', ''password'',
''host/db'')
conn.exec(''select * from tablet '') do |r|
puts r
end
conn.logoff
Any suggestions how to change charset enconding?
Thank you
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
I found the answer, it is: ENV =[NLS_LANG =AMERICAN.AMERICAN.AL32UTF8] Thank you On 14 Ιούν, 13:11, Yiannis <istoseli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have oracle 10g and my db is in AL32UTF8, I had install oci8 from > oracle but when i run a query the greek characters returns with ???. I > tried also with dbi but with no luck. My ruby version is 1.8.7 and my > system ubuntu 10.04. Here is my code: > > require ''rubygems'' > require ''unicode'' > require ''iconv'' > require ''oci8'' > require ''jcode'' > > conn = OCI8.new(''user'', ''password'', ''host/db'') > conn.exec(''select * from tablet '') do |r| > puts r > > end > conn.logoff > > Any suggestions how to change charset enconding? > > Thank you-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Johndel, I came across your post since I have the same issue. Could you explain your answer a bit? Where did you enter that information? regards, Rutger -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.