Re: php rawurldecode from javascripts' escape()




swayze wrote:
> Hi,
>
> I'm sending some vars to php from javascript. These vars contain
> special chars (like "&" ,",")and also turkish characters. Therefore
> I'm using javascripts escape() function to be able to send them
> properly. My problem is on the php side. I am using rawurldecode to
> convert them back. However, Turkish characters like "I" (capital "I"
> with a dot on top) for example still stay encoded as "%u0130".

Try using encodeURIComponent() instead of escape(). The function won't
help you though if you're not using UTF-8.

Instead of dealing with encoding issues manually, I would just create a
hidden form on the fly, fill it in, and submit it.

.



Relevant Pages

  • Re: [PHP] Posting a variable
    ... Just call your vars $foo1 to $fooX-- at least that's ... it warrants an elimination of array access overhead then why not use the ... | An application and templating framework for PHP. ... scalable system for accessing system services | ...
    (php.general)
  • RES: [PHP] Is it possible to send POST vars through a header redirect?
    ... Para: tedd ... Not possible to send POST in header if your aim is to hide vars from users. ... I am a recruiter who joined this list to understand a little about PHP. ... To unsubscribe, visit: http://www.php.net/unsub.php ...
    (php.general)
  • Re: PHP newbie : exist short form for print() ?
    ... >> short form for print out of vars as in the same way as in XSL or JSP? ... > may be problems depending on the PHP server configuration. ... Steve ... Prev by Date: ...
    (comp.lang.php)
  • php rawurldecode from javascripts escape()
    ... I'm sending some vars to php from javascript. ... I've also tried looking at base64 encoding from javascripts' end, ...
    (comp.lang.php)
  • Re: database exception message to user-end information
    ... // the following vars from somewhere ... some column is uniq. ... That way in your debugging output you can see exactly what went wrong ...
    (comp.lang.php)