views:

168

answers:

1

I use decodeURIComponent and encodeURIComponent in Javascript. Before I store this data in a UTF-8-PostgreSQL-Database, I should decode them:

$my_data = pg_escape_string(utf8_encode($_POST['my_data']));

I'm looking for a PostgreSQL-Function to convert Javascript-Encoded Data.

+1  A: 

You're not making yourself too clear, but maybe this will be of interest for you.

Michael Krelin - hacker
Thank you, but I'm missing a more complex function:http://www.w3schools.com/jsref/jsref_encodeURI.asp
maletin
Well, there's no encodeURI function in postgresql. Maybe, there's one available as module. But I doubt you really need it. What are you trying to achieve?
Michael Krelin - hacker