Re: [fw-general] encoding problem in ajax request

2010-02-05 Thread Matthew Weier O'Phinney
-- i...@antoniocaccese.it i...@antoniocaccese.it wrote (on Friday, 05 February 2010, 08:23 AM +0100): My problem is with ajax requests that must return html and not JSON. So, if i receive a string from POST like La vita è bella and save it into DB without apply utf8_decode i'll get a string

Re: [fw-general] encoding problem in ajax request

2010-02-05 Thread Nicolas Grevet
If only the world was this beautiful, it would be great. When full UTF-8 support will be implemented in PHP and that more than a third of the language functions will supprot it, then we'll consider switching to UTF-8. The last project I had to develop with UTF-8, oh god... working with file

Re: [fw-general] encoding problem in ajax request

2010-02-05 Thread Matthew Weier O'Phinney
-- Nicolas Grevet ngre...@alteo.fr wrote (on Friday, 05 February 2010, 04:20 PM +0100): If only the world was this beautiful, it would be great. When full UTF-8 support will be implemented in PHP and that more than a third of the language functions will supprot it, then we'll consider

Re: [fw-general] encoding problem in ajax request

2010-02-05 Thread Pádraic Brady
From: Nicolas Grevet ngre...@alteo.fr To: fw-general@lists.zend.com Sent: Fri, February 5, 2010 3:20:57 PM Subject: Re: [fw-general] encoding problem in ajax request If only the world was this beautiful, it would be great. When full UTF-8 support will be implemented in PHP

Re: [fw-general] encoding problem in ajax request

2010-02-04 Thread drm
i...@antoniocaccese.it wrote: In a controller i use ajaxContext for some actions. In these actions i need to apply utf8_decode for all text fields in POST otherwise the accented characters become like è à ì ù à in the DB. You should fix this on the JS side. The ajax post is apparently

Re: [fw-general] encoding problem in ajax request

2010-02-04 Thread Dmitry Dulepov
Hi! On 4 Feb 2010, at 10:47, drm wrote: You should fix this on the JS side. The ajax post is apparently being encoded in UTF-8. Try inspecting this with Firebug for example. Maybe your JS library is enforcing this. JSON is always UTF-8 (by design). XML can be anything but typically it is

Re: [fw-general] encoding problem in ajax request

2010-02-04 Thread Nicolas Grevet
We have the same problem in french, we're using ISO/IEC 8859-15. By the way, I've yet to hear about a way to change string encoding in javascript. Dmitry Dulepov a écrit : Hi! On 4 Feb 2010, at 10:47, drm wrote: You should fix this on the JS side. The ajax post is apparently being encoded

Re: [fw-general] encoding problem in ajax request

2010-02-04 Thread Dmitry Dulepov
Hi! On 4 Feb 2010, at 11:03, Nicolas Grevet wrote: We have the same problem in french, we're using ISO/IEC 8859-15. By the way, I've yet to hear about a way to change string encoding in javascript. Theoretically you can but practically you can't. PHP expects UTF-8 in json_decode and

Re: [fw-general] encoding problem in ajax request

2010-02-04 Thread Nicolas Grevet
Yeah, that's what we did. But it would be great if Zend_Json_Encoder could automate the process. Auto-encode in the encoder, auto-decode in the decoder. But well, there's much more important things to do for the moment. Dmitry Dulepov a écrit : Hi! On 4 Feb 2010, at 11:03, Nicolas Grevet

Re: [fw-general] encoding problem in ajax request

2010-02-04 Thread info
My problem is with ajax requests that must return html and not JSON. So, if i receive a string from POST like La vita è bella and save it into DB without apply utf8_decode i'll get a string like La vita ù bella. I'm looking for an automatically method or best practise to deal with it.

[fw-general] encoding problem in ajax request

2010-02-03 Thread info
Hi, I am italian and so i use ISO-8859-1 encoding to support accented character (à è ì ò ù). In a controller i use ajaxContext for some actions. In these actions i need to apply utf8_decode for all text fields in POST otherwise the accented characters become like è à ì ù à in the DB.