Jump to content
php.lv forumi

utf8 simboli neradas mysql


vaiiii

Recommended Posts

tatad es meginu ielikt utf8 datubaze, db ir utf8_general_ci, tabulas ari. kad es ielieku ā man rāda phpmyadmin Ä bet ja es ielieku caur phpmyadmin ā tad man rāda phpmyadminā to garo ā pareizi, bet skriptā rāda ?, mb_detect strings rāda, ka caur phpmyadmin ieliktais ir ASCII bet caur skriptu UTF8, vai tā ir phpmyadmin vaina ka nerāda pareizi burtus? es nekā vairāk nevaru uztaisīt export db, jo viss kas ir utf8 tagad ir keburi. skripta enkodings ir ANSI as UTF-8 (UTF-8 without BOM)

ar php,db nemos jau vairak ka gadu, nekad nebij tadas problemas man, jau meginaju mainit ekodingus , bet tapat nekaa.. uz otra pc, ari tada pati problema..

 

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

<?

mysql_connect('localhost','root','root3v45v');

mysql_select_db('fcuk');

mysql_query("INSERT INTO fcuk(fcuk) VALUES('ā')");

$a = mysql_query("SELECT * FROM fcuk");

if (!$a){echo mysql_error();die();}

while ($c = mysql_fetch_assoc($a)){

echo mb_detect_encoding($c['fcuk']).' '.$c['fcuk'].'<br>';

}

?>

 

DB:

CREATE TABLE `fcuk` (

`fcuk` varchar(43) NOT NULL

) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...