nauriz Posted June 19, 2006 Report Share Posted June 19, 2006 Lieta taada: Ir MySQL db, shai db Collation ir utf8_general_ci, visaam tabulaam arii. Es ar phpmyadmin ierakstu tabulaa latvieshu vaardus, tajaa pashaa phpmyadmin apskatot ierakstus tabulaa vaardi raadaas korekti. Tad ir viena lapa, kas lasa shos datus no tabulas, a tur latvieshu burtu vietaaa ir ? ziime. Pie View->Encoding ir Utf8. Lapai ir <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Iisti nesaprotu, kur ir probleema? Link to comment Share on other sites More sharing options...
v3rb0 Posted June 19, 2006 Report Share Posted June 19, 2006 a kad rakstīji vārdus, tad pašam phpmyadminim enkodings bija latviešu? Link to comment Share on other sites More sharing options...
nauriz Posted June 19, 2006 Author Report Share Posted June 19, 2006 (edited) A kur to uzstaada? Itkaa visur ir salikts utf. MySQL connection collation: utf8_general_ci. Ja Tu to domaaji, tad tas ir uzlikts Edited June 19, 2006 by nauriz Link to comment Share on other sites More sharing options...
v3rb0 Posted June 19, 2006 Report Share Posted June 19, 2006 tad gadījumā nav kārtējā 'set names <encoding>' issue? Link to comment Share on other sites More sharing options...
nauriz Posted June 19, 2006 Author Report Share Posted June 19, 2006 Paldies v3rb0, viss aizgaaja. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted June 19, 2006 Report Share Posted June 19, 2006 (edited) mysql_query("SET NAMES UTF8"); protams ieprieksh japiekonekteejas pie DB P.S. es pats izmantoju funkciju kas reiz pa visam reizeem ir uztaisiita un miers --> tik vinju incluudo un peec tam pec vajadziibas izsauc $error_mesage[0]='Nevaru piekonekteties pie DB Servera'; $error_mesage[1]='Nevaru pieslegties pie DB, vai arii shada baze neeksistee' function dbconekt ($hosts, $users, $paswords, $dbname, $error_mesage) { $db=@mysql_connect($hosts, $users, $paswords); if (!$db) // parbaude vai veiksmiigi piekonektejas Mysql serverim { echo $error_mesage[0]; // Kljuudas izvadiishana ja nav MYSQL exit; } if (!@mysql_select_db("$dbname")) // Db izveele { echo $error_mesage[1]; // Kljuudas izvadiishana ja nav DB exit; } @mysql_query("SET NAMES UTF8"); // kodeejuma iestaadiishana ja Mysql =<4.1 } edit : v3rb0 pasteidzaas ;) Edited June 19, 2006 by Grey_Wolf Link to comment Share on other sites More sharing options...
jeebus Posted July 14, 2006 Report Share Posted July 14, 2006 Man ir tieši tāda situācija un problēma. Taču mysql_query("SET NAMES UTF8") to neatrisināja. Piemēram: 1. ieraksts iekš mysql: āšēčķņ 2. bez SET NAMES UTF8.. tas attēlojas kā: ????? 3. ar SET NAMES UTF8: âðçèíò Vai kādam ir nojausma, kur varētu būt problēma (vai vismaz kur to meklēt)? ps man ir php 5.1.2, mysql 5.0 un Apache 2.0.55 Link to comment Share on other sites More sharing options...
Kristabs Posted July 14, 2006 Report Share Posted July 14, 2006 un izpildaamie faili ar noseivoti, kaa utf-8 un meta tagaa arii noraadiits utf-8? Link to comment Share on other sites More sharing options...
direktors Posted July 16, 2006 Report Share Posted July 16, 2006 gribēju tēmu veidot, bet te jau viena ir. tā pati man - ierakstot no phpmyadmin tabulaa rādās kā vajag, bet webā izvelkot huju. pat ne ķeburi bet vienkārši - jautājuma zīmes. kur vaina pats nevaru atrast. Link to comment Share on other sites More sharing options...
v3rb0 Posted July 16, 2006 Report Share Posted July 16, 2006 kāds ir encodings: * db tabulai, * db conekcijai, * uzsetots ar php header(), * norādīts html meta tagā ? Link to comment Share on other sites More sharing options...
direktors Posted July 16, 2006 Report Share Posted July 16, 2006 (edited) kāds ir encodings: * db tabulai, - utf8_latvian_ci * db conekcijai - utf8_latvian_ci (MySQL konekcijas kārtošana) * uzsetots ar php header() - wtf? i mean - kur un kā? * norādīts html meta tagā - utf-8 Edited July 16, 2006 by direktors Link to comment Share on other sites More sharing options...
v3rb0 Posted July 16, 2006 Report Share Posted July 16, 2006 header("Content-type: text/html; charset=UTF-8"); tad tālāk skaties kādu encodingu browseris detectē un kādā encodingā faili saseivoti? Link to comment Share on other sites More sharing options...
Recommended Posts