Starting to work with PHP + Oracle, and I'm having trouble encoding strings in WE8MSWIN1252 format for oracle.
Does anyone have more information?
Starting to work with PHP + Oracle, and I'm having trouble encoding strings in WE8MSWIN1252 format for oracle.
Does anyone have more information?
Except for some small differences WE8MSWIN1252 is equivalent to ISO-8859-1 so if you use UTF-8 in your PHP pages you should look for a function that converts the UTF-8 Strings to WE8MSWIN1252 and another that does the opposite. This way you can convert the data type String before it persists in Oracle and also after reading from Oracle.
From the WEB to the database
$utf8 = 'ÁÉÍÓÚÇÃÕ'; // o arquivo HTML / PHP deve estar codificado em UTF-8
$db_iso88591 = utf8_decode($utf8);
From Database to WEB
$db_iso88591 = 'ÁÉÍÓÚÇÃÕ'; // dado veio do database em ISO-8859-1 compativel
$utf8 = utf8_encode($db_iso88591);