Thread

Posted on Fri May 20 09:11:39 2005 by kedlubnowski
unicode in merge_range()
Is there a way to force merge_range() to use write_unicode() instead of write() ? write() doesn't handle unicode correctly on my system (perl 5.8.0).
Direct Responses: 480 | 481 | Write a response
Posted on Fri May 20 11:38:24 2005 by eserte in response to 479
Re: unicode in merge_range()
From looking at the .../Worksheet.pm source, the logic in write_string() seems to be right. If it's an utf-8 string, then fallback to write_unicode_le(). Can you post a small working example which exhibits the problem?
Write a response
Posted on Fri May 20 13:16:56 2005 by jmcnamara in response to 479
Re: unicode in merge_range()

The merge_range() should work with utf8. I've tested it with perl 5.8.0. Try post an example program based on bug_report.pl in the examples directory of the distro.

It is also possible to get it to work with UTF16 and write_unicode() but it isn't a great solution. It would be better to get UTF8 working instead.

John.
--
Direct Responses: 482 | Write a response
Posted on Fri May 20 15:08:23 2005 by kedlubnowski in response to 481
Re: unicode in merge_range()
Sorry, my fault. I was in a hurry and didn't pay much attention to that utf16 and ut8 differencies. The input was in iso8859-2, so I converted it with Unicode::Map and use write_unicode.
Using Encode::decode and write() works fine.

Thanks for replies.
Write a response