Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Special characters and database

Name: Anonymous 2009-03-12 14:45

Hello,

I have coded a script, I have tried to post russian like this:
МАДРИД, 2 мар - РИА Новости. Супруга президента РФ Светлана Медведева в понедельник в сопровождении королевы Софии посетила Высшую школу музыки в Мадриде. Эта школа, которая носит имя королевы Софии, является наиболее престижным в Испании музыкальным учебным заведением, прежде всего благодаря работе в ней российских специалистов. Уже много лет кафедру фортепьяно в этой школе возглавляет известный русский пианист и педагог Дмитрий Башкиров, кафедру скрипки - Захар Брон, а кафедру виолончели - Наталия ...


But I have this (displayed):  http://s5.tinypic.com/156zoyw.jpg


and I have this in phpmyadmin: http://s5.tinypic.com/2d7x66e.jpg


I have this meta:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">



and my table in my database is encoded in utf8_bin and the type is: "text"


How can I put correctly some russian, japanese, chinese etc.. ?

thanks

Name: Anonymous 2009-03-12 15:00

That data is definitely UTF-8 Cyrillic, but it's being displayed as ISO8859-1.

You can tell this because the Đ character keeps cropping up followed by another character.  "Đ" is 0xD0 hexadecimal in ISO8859-1, which in binary is 11010000. The two character UTF-8 format is 110aaabb 10bbbbbb, where aaa is the lower three bits of the higher byte, and bbbbbbbb constitutes the lower byte. So the 100 of 11010000 indicates that the Unicode character being encoded by this UTF-8 string is of the form 0x4nn.

In short, you need to check if the charset you're using for display really is UTF-8.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List