breaststroke Posted March 29, 2011 Share Posted March 29, 2011 Hello!I am having trouble to configurating my website to accept every language.I have managed to get every character (at least so far..) into my mysql database correctly.Collation on mysql is utf8_unicode_ci (because it is the one which accepts every language, I think).On every file I have added a meta with charset utf-8, and always after a conexion to my database I add the following:mysql_set_charset ('utf8');But when it comes to print any text sometimes some characters are substituted by a "?" sign.Any idea how to solve this?Thank you very much in advanceRegards Link to comment Share on other sites More sharing options...
[dx] Posted March 30, 2011 Share Posted March 30, 2011 Give a try with mysql_query("SET NAMES 'utf8'"); Not sure will it help anything. Link to comment Share on other sites More sharing options...
breaststroke Posted March 30, 2011 Author Share Posted March 30, 2011 Give a try with mysql_query("SET NAMES 'utf8'"); Not sure will it help anything.thank you Haris S.I tried with that before but I had the same problem. In fact a bit worse I think , since there were more characters wrongly interpreted.Since the characters appear fine on my databases I guess the problem should be only at the moment of printing them, but I am not sure of this, and I have checked the queries and seem to be fine..regards Link to comment Share on other sites More sharing options...
breaststroke Posted April 7, 2011 Author Share Posted April 7, 2011 (sorry, I sent this post by mistake) ,I don't know how to remove it. Link to comment Share on other sites More sharing options...
breaststroke Posted April 7, 2011 Author Share Posted April 7, 2011 Hello again,I am still striving to solve this problem .I have found out it is the wordwrap function that I use just after selecting the data from a query which makes my texts give those errors. include('conexioninclude.php');mysql_set_charset('utf8');$registros=mysql_query("SELECT ..........",$conexion)or die("Problemas en el selectt:".mysql_error());$total_paginas=ceil($total_registros/8);while($reg=mysql_fetch_array($registros)){..$text=$reg['text'];$text2= nl2br($text);$newtext= wordwrap($text2, 20, "n", true);.. I wonder what I can replace wordwrap function with to get the same results. Regards! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.