Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed a complete LAMP on my computer and I have some trouble with the charset.
In MySql, I have a database with utf-8 characters.
I have a website on the localhost where every PHP page is encoded in utf-8 too. The HTML header specifies that the page is encoded in utf-8.
When I access the website from my web browser, all the characters look normal. But when I request some data from the MySql database, all the special characters (é è ç à...) are replaced with some strange character.
If I fill a form on my website with special characters and that I save this entry into my Mysql database, I get strange characters in my database too (but not the same).
I tried to set every default characterset as utf-8 wherever I could in PHP, Apache2 and MySql configuration files, without any success.
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262
Rep:
which version of mysql are you using ? On newer version (starting 4.1 from memory), character sets/collations can be set in tons of different places: server, client, connection, database, table, column.... I would check that none of these have a value you do not want to use (like latin1), especially at the table or column level. A tool like phpMyAdmin (recent version) could help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.