Skip to content
Advertisement

Tag: utf-8

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

glob() can’t find file names with multibyte characters on Windows?

I’m writing a file manager and need to scan directories and deal with renaming files that may have multibyte characters. I’m working on it locally on Windows/Apache PHP 5.3.8, with the following file names in a directory: filename.jpg имяфайла.jpg file件name.jpg פילענאַמע.jpg 文件名.jpg Testing on a live UNIX server woked fine. Testing locally on Windows using glob(‘./path/*’) returns only the first

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

How can I detect a malformed UTF-8 string in PHP?

The iconv function sometimes gives me an error: Is there a way to detect that there are illegal characters in a UTF-8 string before sending data to inconv()? Answer First, note that it is not possible to detect whether text belongs to a specific undesired encoding. You can only check whether a string is valid in a given encoding. You

fwrite() and UTF8

I am creating a file using php fwrite() and I know all my data is in UTF8 ( I have done extensive testing on this – when saving data to db and outputting on normal webpage all work fine and report as utf8.), but I am being told the file I am outputting contains non utf8 data 🙁 Is there

How to set UTF-8 encoding for a PHP file

I have a PHP script called : http://cyber-flick.com/apiMorpho.php?method=getMorphoData&word=kot That displays some data in plain text: As you can see in place of proper chars there are so “bushes”. What i would like to do is display this in a way so that people see in browser proper UTF-8 characters. You can encapsulate it in HMTL tags and set in meta

Advertisement