Thread

Posted on Sat Jan 6 12:00:29 2007 by iwanami
set_header() in multi-byte string
Hi, I'm trying to use set_header() method in order to describe in the multi-byte string(Japanese), but garbling occurs. The following codes is what I tried. I'd like to know the correct way.
use strict; use Encode; use Unicode::String qw(utf8 utf16); use Spreadsheet::WriteExcel; use Jcode; my $string; # multi-byte string in euc-jp my $str1 = "\xa5\xef\xa1\xbc\xa5\xaf\xa5\xb7\xa1\xbc\xa5\xc8"; my $workbook = Spreadsheet::WriteExcel->new("sample.xls"); my $sheet = $workbook->add_worksheet(to_utf16($str1), 1); $sheet->set_header("&L&\"MS PGothic\"".to_utf16($str1)."&R&P / &N", 0.51); sub to_utf16 { return utf8( encode("utf-8", decode("cp932", Jcode->new($_[0],"euc")->sjis)) )->utf16; }
Another incident, it can be possible to vertical writing using the vertical fonts of MS PGothic in the cell formatting? The vertical writing is different from the rotation, which is in the horizontal writing, from the top to the bottom. I'm sorry for my poor English.
Direct Responses: 3984 | Write a response
Posted on Sat Jan 6 22:29:43 2007 by jmcnamara in response to 3981
Re: set_header() in multi-byte string

Semi-automated response:

Hi,

Can you please post your question to the Spreadsheet::WriteExcel Google-Group.

http://groups.google.com/group/spreadsheet-writeexcel

Thank you,

John.
--
Direct Responses: 3985 | Write a response
Posted on Sun Jan 7 04:22:00 2007 by iwanami in response to 3984
Re: set_header() in multi-byte string
Sure, I did post my question to the Google-Group. Thank you, Iwanami
Write a response