If you include that in the restore, I think many users will be happy.
Ralf
jaytraxx schrieb:
I found one hint on php.net:
$out = preg_replace(’!s:(\d+):"(.*?)";!se’, “‘s:’.strlen(’$2’).’:”$2";’",
$serialized );
$value = unserialize($out);
This re-calclulates every stringlen of every value before giving the string
to unserialize(), means:
a:17:{s:8:“currency”;s:1:“€” …
gets
a:17:{s:8:“currency”;s:3:“€” …
What do you think?
Greetings
christian
jaytraxx wrote:
Hi folks,
I’m currently migrating our EGw from iso charset to utf-8. I do that in
setup with a database export and re-import it with the new system charset.
It’s working mostly fine. The only problem comes up with serialized arrays
(e.g. preferences) which include special characters, like e.g. the € (EUR)
sign.
In ISO, the € (EUR) value is serialized like that:
a:17:{s:8:“currency”;s:1:“€” …
If I re-import the database now with utf-8 as charset, nothing is changed
on the serialized array on re-import. It remains with
a:17:{s:8:“currency”;s:1:“€” …
But, the € (EUR) sign in UTF-8 is three chars long and until I don’t
change the value to
a:17:{s:8:“currency”;s:3:“€” …
all unserialize calls on the string end up with “false”.
Anyone out there having a fix for that is welcome. I just want to avoid
changing all the serialized fields by myself. Maybe there is a possibility
to adjust the value length somehow on re-import time.
Greetings
christian
–
Ralf Becker
Director Software Development
Stylite GmbH
[open style of IT]
Morschheimer Strasse 15
67292 Kirchheimbolanden
fon +49 (0) 6352 70629-0
fax +49 (0) 6352 70629-30
mailto: rb@stylite.de
www.stylite.de
www.egroupware.org
Geschäftsführer Andre Keller,
Gudrun Müller, Ralf Becker
Registergericht Kaiserslautern HRB 30575
Umsatzsteuer-Id / VAT-Id: DE214280951
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers