Hey all,
I''ve been looking into moving our Rails app to 1.9 and am having lots
of
trouble with string encodings, especially when it comes to file uploads.
We allow users to upload text files, which may, or may not, have
accented characters in them. If there are accented characters, we insist
that the file is UTF-8, but if there are no accented characters we
don''t
care what encoding the file is.
It seems that w/ Rails 2.3.5 ALL files upload as ASCII-8BIT, regardless
of OS $LANG setting, or actual file encoding.
params[:file].external_encoding also appears to be ASCII-8BIT as well,
so I can''t use content.encode("utf-8", xxx) because
I''ve no idea what
the file is *supposed* to be encoded as.
Since I''m on OSX and $LANG == en_AU.UTF-8, shouldn''t all files
default
to UTF-8 unless explicitly told otherwise?
Has anyone got 2.3.5 working well w/ 1.9 when accented characters are
involved?
Any tips?
thanks,
donncha
--
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.