Ruby on Rails Wednesday, December 15, 2010

Hi everybody

I'am working on a Rails app (using utf-8) in which I use the Spreadsheet
gem to generate Excel files (.xls in my case).

I ran into some issues when trying to write foreign characters to the
generated Excel-File.

The solution I found so far is to use Iconv like this:
Iconv.conv('ISO-8859-9', 'utf-8', some_string)

This works fine with for example turkish or spanish special characters.
However I cant figure out how to deal with japanese characters.

My question is how do I have to use Iconv to encode the japanese
characters so they will be correctly inserted into the Excel file.

Also I would be interested in some background info on this problem (
namely generating office files and utf-8 ) since I honestly don't really
understand the whole issue Excel seems to have there.

Thanks in advance for any kind of help and advice.

jruby 1.5.0
rails 2.3.8
spreadsheet 0.6.4.1

--
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@googlegroups.com.
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.

No comments:

Post a Comment