serialize() and special ANSI characters

From: Date: Mon, 19 Feb 2007 14:56:15 +0000
Subject: serialize() and special ANSI characters
Groups: php.general 
Request: Send a blank email to php-general+get-249019@lists.php.net to get a copy of this message
Hi all, I'm just curious to find out if I'm the only person to have bumped into this kind of issue with serialize/unserialize. When I try and serialize an array containing a string value with the "±" character (alt+241 ASCII) such as : "120GB 2X512MB 15.4IN DVD±RW VHP FR" The resulting serialized array is truncated. ie. I would obtain : "a:17:{i:0;s:1:"A";i:1;s:7:"TOSHIBA";i:2;s:4:"3740";i:3;s:7:"404D862";i:4;s:31:"SATELLITE A100-044 CD/T2060-1.6";i:5;s:35:"120GB 2X512MB 15.4IN DVD" As you can see serialization seems to stall as soon as the "±" character shows up. Do any of you have the same issue? And what could be a work around for this sort of problem. This has occurred on a Windows XP box running PHP 5.2.0. The string is obtained from a CSV file using ANSI encoding. Thanks, Youri

« previous php.general (#249019) next »