Re: [Cgi-session-user] utf8 problem
Brought to you by:
sherzodr
|
From: Ron S. <ro...@sa...> - 2015-07-09 22:57:22
|
Hi Thomas
My immediate reaction is to suggest you redefine the column holding
sesions to be a binary blob of some sort. The syntax will vary from db
to db, of course.
Please let us know how that turns out.
On 09/07/15 22:36, Thomas Glase wrote:
> Hi,
>
> I'm having problems getting CGI::Session to work with utf8.
> I read the "A Warning about UTF8" section but I couldn't find the
> following issue anywhere:
>
> In my session I have utf8 encoded strings like 'jörg'.
>
> The session data gets serialized by default serializer Data::Dumper into
> a MySQL data column (mediumtext, charset utf8, collation
> utf8_unicode_ci) as expected with utf8 characters escaped like this:
> 'j\x{f6}rg'
>
> Now, the problem is that when this session data get's thawed, the
> resulting string 'jörg' is missing perls utf8 flag. Which causes
> Data::Dumper to just cut the data at the utf8 character 'ö' during next
> freeze. Result: the dump is stored corrupted in the data column and
> Data::Dumper crashes of course when trying to thaw that next time.
>
> I already posted this problem incl more details and code snippets at
> stackoverflow to no avail:
>
> http://stackoverflow.com/questions/31049125/perl-cgisession-mysql-thaw-utf-8-data
>
>
> It looks like a bug to me but since I don't think that I'm the only one
> trying to use CGI::Session with utf8 characters I guess that I rather
> must be missing something here.
>
> I'd be really grateful for any hints on this.
>
> Best regards,
> Thomas
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Cgi-session-user mailing list
> Cgi...@li...
> https://lists.sourceforge.net/lists/listinfo/cgi-session-user
>
--
Ron Savage - savage.net.au
|