Post by nikitas » Mon Oct 05, 2009 4:30 am

Would it be possible to change the encoding of the Files ( all!!!) to utf-8 ( see the attachment).As a novice php developer and with greek as my native language i've come up to this conclusion while using non utf-8 file encodig ( please check the attachment ) when data is stored to database and they dont use UTF-8 encoding it's messy if the file is not converted to utf-8.I saw some bugs conserning greek letters that wont be saved etc.You can use this method 2 in order to have utf-8 characters used and saved into the database and not html entitites.This must be done for all the files!I'm using Notepad++ but i cant find a script for batch converting to utf-8. :(

Code: Select all

<?PHP
$conn=mysql_connect("localhost", "root", "") or die(mysql_error());
[b]mysql_query("SET NAMES 'utf8'", $conn)[/b];  <--- MAKE SURE ALL CHARS ARE UTF-8
mysql_select_db("test") or die(mysql_error());
?>
Please notice that if it works for Greek probably it will work for all the other Langs!!!

Attachments

BrowserPreview.png

BrowserPreview.png (33.09 KiB) Viewed 1424 times


Newbie

Posts

Joined
Thu Sep 17, 2009 1:17 am
Who is online

Users browsing this forum: No registered users and 13 guests