Convert foreign characters from UTF8 to latin1
authorJoey Schulze <joey@infodrom.org>
Sun, 7 Apr 2013 16:09:41 +0000 (16:09 +0000)
committerJoey Schulze <joey@infodrom.org>
Sun, 7 Apr 2013 16:09:41 +0000 (16:09 +0000)
src/InfoCon/stempel/index.wml

index 24bdee2..5006347 100644 (file)
@@ -9,7 +9,7 @@
 
   if ($_POST['func'] == 'save') {
     $sql = sprintf("UPDATE stempel SET task = '%s' WHERE oid = %d",
 
   if ($_POST['func'] == 'save') {
     $sql = sprintf("UPDATE stempel SET task = '%s' WHERE oid = %d",
-                  pg_escape_string($_POST['task']),
+                  pg_escape_string(utf8_decode($_POST['task'])),
                   $_POST['oid']);
     pg_exec($sql);
 
                   $_POST['oid']);
     pg_exec($sql);