otuatail Posted September 12, 2015 Share Posted September 12, 2015 (edited) Hi. I have a field in a table `Comment` varchar(32). I enter the following text Food value £12.52, but when I back up the table and look at it in a text editor I get the following. Food value £12.52 I have a character ascii value 0194 before the pound sign. Can I correct this? I forgot to say that I don't see this character when I am looking at the web page. Edited September 12, 2015 by otuatail Quote Link to comment https://forums.phpfreaks.com/topic/298140-strange-table-entry-in-varchar-field/ Share on other sites More sharing options...
requinix Posted September 12, 2015 Share Posted September 12, 2015 Your character encoding settings are not consistent. Make sure that - Your HTML pages are using UTF-8 because they do not by default; use a and/or configure your server and PHP code to return the UTF-8 encoding - Your database has utf8 as the default encoding; a SHOW CREATE DATABASE will the encoding - Your table is using the utf8 encoding; a SHOW CREATE TABLE will show the encoding - Your table columns are using the utf8 encoding; if your table is but your columns are not then a SHOW CREATE TABLE will show it - Your database connection is using the utf8 encoding; for MySQL you have to pay attention to both the server and client settings Missing any one of those can cause the problem you're seeing. Quote Link to comment https://forums.phpfreaks.com/topic/298140-strange-table-entry-in-varchar-field/#findComment-1520705 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.