According to php.net, Stack Overflow and other sources of trust, I can find 4 different ways to set UTF-8 on PDO connection, but can’t find which one is the better to choose: $pdo_db = ‘mysql:host=…
Tag: character-encoding
UTF 8 and Windows 1254 charset mismatch
I’m using Drupal 7. And i created a block and embed this code: My site charset: And external link charset is: So, when get some info on external link, i have character problem (don’t seen İ, ç, ş etc..) How can i solve this? Answer In your block, I would create these two lines: so this page’s contents will be
UTF-8 safe equivalent of ord or charCodeAt() in PHP
I need to be able to use ord() to get the same value as javascript’s charCodeAt() function. The problem is that ord() doesn’t support UTF8. How can I get Ą to translate to 260 in PHP? I’ve tried some uniord functions out there, but they all report 256 instead of 260. Thanks a lot for any help! Regards Answer ord()
special characters turn into question marks php html
I read all the topics found on stackoverflow and other forums, it’s hosted on hostgator and I’ve never had problems with their servers before although quotes for example are transformed into question …
Convert latin1 characters on a UTF8 table into UTF8
Only today I realized that I was missing this in my PHP scripts: All my tables are InnoDB, collation “utf8_unicode_ci”, and all my VARCHAR columns are “utf8_unicode_ci” as well. I have mb_internal_encoding(‘UTF-8’); on my PHP scripts, and all my PHP files are encoded as UTF-8. So, until now, every time I “INSERT” something with diacritics, example: The ‘name’ contents would
Dealing with eacute and other special characters using Oracle, PHP and Oci8
Hi I am trying to store names into an Oracle database and fetch them back using PHP and oci8. However, if I insert the é directly into the Oracle database and use oci8 to fetch it back I just receive an e Do I have to encode all special characters (including é) into html entities (ie: é) before inserting into
Detect file encoding in PHP
I have a script which combines a number of files into one, and it breaks when one of the files has UTF8 encoding. I figure that I should be using the utf8_decode() function when reading the files, but I don’t know how to tell which need decoding. My code is basically: Currently, at the start of a UTF8 file, it