Skip Menu |
 

This queue is for tickets about the Data-AMF CPAN distribution.

Report information
The Basics
Id: 53587
Status: new
Priority: 0/
Queue: Data-AMF

People
Owner: Nobody in particular
Requestors: derhoermi [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Trouble handling Unicode strings
Date: Mon, 11 Jan 2010 11:27:46 +0100
To: bug-data-amf [...] rt.cpan.org
From: Bjoern Hoehrmann <derhoermi [...] gmx.net>
Download (untitled) / with headers
text/plain 812b
Hi, It seems there is a problem serializing Unicode data, consider for example: % perl -MEncode -MData::AMF -e "print Data::AMF->new( version => 3)->serialize(qq|\x{20AC}|)" Wide character in print at -e line 1. I would probably use Encode::encode_utf8 on any string that has the UTF-8 flag set before writing (assuming AMF uses UTF-8 as encoding), but at least some warning should be included in the documentation (this actually results in corrupted data in some cases, but encoding the data before passing it to the serialization function fixes that). regards, -- Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.