At 12:14 AM 9/8/2005, Alexey Verkhovsky wrote:
Bret Pettichord wrote:
I'd appreciate any insight into this matter that you might have. I've
spent a couple days reading up on UTF-8 and Unicode, but don't really
have any experience with these things.
Bret, hi
Try to add this to your code:
# Enable UTF-8 support
$KCODE = 'u'
require 'jcode'
Not sure if it will help for OLE, but it may.
Alex
Thanks for the idea. No luck. Here's my complete test script:
$KCODE = 'u'
require 'jcode'
require 'spreadsheet'
def copy_column (column)
data = $sheet.cells(1, column).value
$sheet.cells(2, column).value = data
puts data
puts data.unpack("U*")
puts "length: #{data.length}"
puts "jlength: #{data.jlength}"
require 'breakpoint';breakpoint
end
this_dir = File.expand_path(File.dirname(__FILE__))
workbook = Workbook.new("#{this_dir}\\intl_text.xls")
workbook.visible = true
$sheet = workbook.use_page 1
copy_column 'b'
copy_column 'c'
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general