Bug#297571: libspreadsheet-writeexcel-perl: non-ascii in $wb->add_worksheet and perl's, utf8
Damyan Ivanov
Damyan Ivanov <divanov@creditreform.bg>, 297571@bugs.debian.org
Tue, 01 Mar 2005 17:16:25 +0200
This is a multi-part message in MIME format.
--------------060202050705030600050408
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Package: libspreadsheet-writeexcel-perl
Version: 2.11-2
Severity: normal
Tags: patch, upstream
Hi, group,
Below is a patch, which enables using national non-ascii characters in
worksheet name in $wb->add_worksheet('name').
Currently WriteExcel supports non-ascii chatacters for add_worksheet,
but they have to be manually encoded in utf16-be and a special aprameter
is needed, i.e.
$wb->add_worksheet(Encode::encode('utf-16be', 'non-ascii'), 1);
After my patch, the above becomes:
$wb->add_worksheet('non-ascii')
which is the same as in ascii-only worksheet names. Ah, and the above
line should be in "use utf8" context, of course.
I've already reported the bug upstream. See
https://rt.cpan.org/NoAuth/Bug.html?id=11700
The reasons I am writing here too are:
1) Someone may see something wrong with the patch, in which case I'd be
~ most happy to fix it.
2) Upstream may delay applying the patch, but I'd like to add non-ascii
support in add_worksheet asap, provided there are no objections here.
Ah, by the way, there is some missing "native" utf8 support in
ParseExcel too, but I am still investigating. I'll provide
bugreport/patch when I have a clearer idea of what's wrong.
Best regards,
dam
- -- System Information:
Debian Release: 3.1
~ APT prefers unstable
~ APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10+dam.1
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Versions of packages libspreadsheet-writeexcel-perl depends on:
ii libparse-recdescent-perl 1.94-1 Generates recursive-descent
parser
ii perl 5.8.4-6 Larry Wall's Practical
Extraction
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCJIdJHqjlqpcl9jsRApG3AJ4mcQ9sGK5nKYFNlm9GgyfxEbc7LgCfYwQJ
GSX+IkEf0tFqFQ37FlP8J7U=
=YcDI
-----END PGP SIGNATURE-----
--------------060202050705030600050408
Content-Type: text/plain;
name="patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="patch"
LS0tIC91c3Ivc2hhcmUvcGVybDUvU3ByZWFkc2hlZXQvV3JpdGVFeGNlbC9Xb3JrYm9vay5w
bQkyMDA1LTAxLTI1IDE4OjM1OjI3LjAwMDAwMDAwMCArMDIwMAorKysgL3RtcC9Xb3JrYm9v
ay5wbQkyMDA1LTAzLTAxIDE2OjMxOjA1Ljc1OTI1OTYxNSArMDIwMApAQCAtMzMyLDYgKzMz
MiwxNiBAQAogICAgIG15ICRlbmNvZGluZyA9ICRfWzFdIHx8IDA7DQogICAgIG15ICRsaW1p
dCAgICA9ICRlbmNvZGluZyA/IDYyIDogMzE7DQogDQorICAgICMgU3VwcG9ydCBuZXdlciBw
ZXJscyBuYXRpdmUgdW5pY29kZQ0KKyAgICBpZiAoJF0gPj0gNS4wMDgpIHsNCisgICAgICAg
IHJlcXVpcmUgRW5jb2RlOw0KKw0KKyAgICAgICAgaWYgKG5vdCAkZW5jb2RpbmcgYW5kIEVu
Y29kZTo6aXNfdXRmOCgkbmFtZSkpIHsNCisgICAgICAgICAgICAkbmFtZSA9IEVuY29kZTo6
ZW5jb2RlKCJVVEYtMTZCRSIsICRuYW1lKTsNCisJICAgICRlbmNvZGluZyA9IDE7DQorCSAg
ICAkbGltaXQgPSA2MjsNCisgICAgICAgIH0NCisgICAgfQ0KIA0KICAgICAjIENoZWNrIHRo
YXQgc2hlZXRuYW1lIGlzIDw9IDMxICgxIG9yIDIgYnl0ZSBjaGFycykuIEV4Y2VsIGxpbWl0
Lg0KICAgICBjcm9hayAiU2hlZXRuYW1lICRuYW1lIG11c3QgYmUgPD0gMzEgY2hhcnMiIGlm
IGxlbmd0aCAkbmFtZSA+ICRsaW1pdDsNCg==
--------------060202050705030600050408--