zintis8789 Posted January 25, 2010 Report Share Posted January 25, 2010 Man no datubāzes izvek šādu tekstu: PieteikÅ¡anÄs 11. NHL turnÄ«ram. Bet man vajag šādu: Pieteikšanās 11. MHL turnīram. Kāds encodings man vajadzigs? Quote Link to comment Share on other sites More sharing options...
xmas12 Posted January 25, 2010 Report Share Posted January 25, 2010 Tev jaizmanto utf8 ! vai utf-8 :D Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted January 25, 2010 Author Report Share Posted January 25, 2010 mysql_query("SET NAMES UTF8_general_ci COLLATE utf8 "); Man ir šāds kods. Quote Link to comment Share on other sites More sharing options...
xmas12 Posted January 25, 2010 Report Share Posted January 25, 2010 Kādu editor programu tu izmanto? (notepad++ ?)Vislabaaksi butu izmantot notepad++ , tur var uzlikts pašrocīgi encoding! Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted January 25, 2010 Author Report Share Posted January 25, 2010 Man tie faili stāv uz hosta .. Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted January 25, 2010 Author Report Share Posted January 25, 2010 Nu es no foruma meiģinu dabūt ārā pēdejos 5 postus forumā rāda ar garumzīmēm bet webā ar ķeburiem.. Quote Link to comment Share on other sites More sharing options...
xmas12 Posted January 25, 2010 Report Share Posted January 25, 2010 Reku http://notepad-plus.sourceforge.net/uk/download.php nolade un atver failu, pectam vnk atverot failu ieej , Encoding--> Covert to UTF8 vai Convert To UTF8 without BOM un garumzimes uzliksies! Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted January 25, 2010 Author Report Share Posted January 25, 2010 (edited) Rādas visulaiku tie ķeburi.. Edited January 25, 2010 by zintis8789 Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted January 25, 2010 Report Share Posted January 25, 2010 Visur ir jabut UTF-8. DB savienojumam, DB tabulam/laukiem. HTML + utf-8 meta tags. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted January 25, 2010 Report Share Posted January 25, 2010 Un SET NAMES vieta ir ieteicams izmantot so funkciju: http://uk.php.net/manual/en/function.mysql-set-charset.php Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted January 25, 2010 Author Report Share Posted January 25, 2010 (edited) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//LV" "http://www.w3.org/TR/html4/loose.dtd"> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="lv" /> <b><tr class="sectiontableentry1"><td align="left" height="20"> <? $db_host = 'localhost'; $db_user = 'userpass'; $db_name = 'db'; $connection = @mysql_connect($db_host, $db_user, $db_password) or die(mysql_error()); mysql_select_db($db_name, $connection); $result1 = mysql_query("SELECT * FROM ipb_topics ORDER BY `ipb_topics`.`last_post` DESC LIMIT 0,1 "); $row1 = mysql_fetch_assoc($result1); $title = $row1['title']; $id = $row1['tid']; $posts = $row1['posts']; ?> <b><a href="forum//index.php?/topic/<? echo $id; ?>-<? echo $title; ?>/"><? echo $title; ?></a> <? if($title != ''){ echo "["; echo $posts; echo "]"; } ?> </b></td></tr> Mani ir šāds kods mainu ko gribu ķeburi paliek.. Edited January 25, 2010 by zintis8789 Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted January 25, 2010 Report Share Posted January 25, 2010 es tur neredzu MySQL konekcijas kodejuma uzstadisanu... Nerunajot nemaz par head, body, html tagiem, bet pienemu (un) ceru, ka tu tos vnk neesi ielicis seit... Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted January 25, 2010 Author Report Share Posted January 25, 2010 (edited) Man tas kods ir domāts kā include. kautko uzmālēju bet burti kā nau tā nau. <b><tr class="sectiontableentry1"><td align="left" height="20"> <? $db_host = 'localhost'; $db_user = 'xxxx'; $db_password = 'xxx'; $db_name = 'xxx'; $connection = @mysql_connect($db_host, $db_user, $db_password) or die(mysql_error()); mysql_select_db($db_name, $connection); mysql_set_charset('utf8',$connection); $result1 = mysql_query("SELECT * FROM ipb_topics ORDER BY `ipb_topics`.`last_post` DESC LIMIT 0,1 "); $row1 = mysql_fetch_assoc($result1); $title = $row1['title']; $id = $row1['tid']; $posts = $row1['posts']; utf8_encode($title); ?> <b><a href="forum//index.php?/topic/<? echo $id; ?>-<? echo $title; ?>/"><? echo $title; ?></a> <? if($title != ''){ echo "["; echo $posts; echo "]"; } ?> </b></td></tr> Edited January 25, 2010 by zintis8789 Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted January 25, 2010 Report Share Posted January 25, 2010 meta tags ir jaliek starp head tagiem. Un vispar tev pasi dati ir kada kodejuma? (ieks DB) Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted January 25, 2010 Author Report Share Posted January 25, 2010 (edited) --- utf8_general_ci Edited January 25, 2010 by zintis8789 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.