jwhite68 Posted May 24, 2007 Share Posted May 24, 2007 I am developing a global web application, and encountered a disappointing issue with utf-8. Having conducted a lot of research to decide what the best method of encoding would be, that would allow people from all over the world to add text to my site, utf-8 (unicode) seemed the most appropriate. But when I tried to display French text with accents, it could not be displayed in utf-8. What a major oversight on the part of the group who developed this encoding. How on earth could such a group make such a mistake? Since I display regions from around the world, I want to be able to display a region list for a particular country. The only way I can achieve this is to use iso-8559-1 encoding, which then displays the French accent characters. But then, iso-8559-1 does not support the euro character. What a mess. The issue then comes as to what collation to use in MySQL to store data entered by users. I wanted to use utf-8, but this means if I use iso-8559-1 for the forms that display/enter data related to countries/regions - any accents would not be stored in MySQL under utf-8 encoding. It seems you simply cannot win. Does anyone else have such problems? Any advice would be welcome. Shame on the creators of these encodings - who seem to lack a real understanding of the global requirements for text and symbols. Quote Link to comment https://forums.phpfreaks.com/topic/52821-solved-iso-8859-versus-utf-8/ Share on other sites More sharing options...
trq Posted May 24, 2007 Share Posted May 24, 2007 I do believe (though I know little about it) utf-8 isn't planned on being fully supported until php6 is released. Quote Link to comment https://forums.phpfreaks.com/topic/52821-solved-iso-8859-versus-utf-8/#findComment-260769 Share on other sites More sharing options...
448191 Posted May 24, 2007 Share Posted May 24, 2007 But when I tried to display French text with accents, it could not be displayed in utf-8. Are you 100% sure about this? What characters are we talking about? Quote Link to comment https://forums.phpfreaks.com/topic/52821-solved-iso-8859-versus-utf-8/#findComment-260862 Share on other sites More sharing options...
jwhite68 Posted May 24, 2007 Author Share Posted May 24, 2007 Yes I am sure. This article touches on it: http://www-1.ibm.com/support/docview.wss?rs=1041&context=SS6JVW&dc=DB520&uid=swg21254098&loc=en_US&cs=UTF-8&lang=en&rss=ct1041lotus Also, the characters are ä, ö, é, ç, ã etc. Quote Link to comment https://forums.phpfreaks.com/topic/52821-solved-iso-8859-versus-utf-8/#findComment-260877 Share on other sites More sharing options...
448191 Posted May 24, 2007 Share Posted May 24, 2007 I don't get that. All of those are supported by UTF-8: http://www.unics.uni-hannover.de/nhtcapri/multilingual1.html Unicode (UTF- test You can use this document to check if your browser and your installed fonts display multilingual HTML documents in Unicode (UTF- correctly. Letters with acute AÁ aá CĆ cć EÉ eé IÍ ií LĹ lĺ NŃ nń OÓ oó RŔ rŕ SŚ sś UÚ uú YÝ yý ZŹ zź Letters with apostrophe (hacek) dď LĽ lľ tť Letters with breve AĂ aă GĞ gğ UŬ uŭ Letters with caron (hacek) CČ cč DĎ EĚ eě NŇ nň RŘ rř SŠ sš TŤ ZŽ zž Letters with cedilla (comma) CÇ cç GĢ gģ KĶ kķ LĻ lļ NŅ nņ RŖ rŗ SŞ sş TŢ tţ Letters with circumflex A aâ CĈ cĉ EÊ eê GĜ gĝ HĤ hĥ IÎ iî JĴ jĵ OÔ oô SŜ sŝ UÛ uû WŴ wŵ YŶ yŷ Letters with diaeresis (umlaut) AÄ aä EË eë IÏ iï OÖ oö UÜ uü YŸ yÿ Letters with/without dot above CĊ cċ EĖ eė GĠ gġ Iİ iı ZŻ zż Letters with double acute OŐ oő UŰ uű Letters with grave AÀ aà EÈ eè IÌ iì OÒ oò UÙ uù Letters with horn OƠ oơ UƯ uư Letters with macron AĀ aā EĒ eē IĪ iī OŌ oō UŪ uū Letters with ogonek AĄ aą EĘ eę IĮ iį UŲ uų Letters with ring above AÅ aå UŮ uů Letters with stroke DĐ dđ HĦ hħ LŁ lł OØ oø Letters with tilde Aà aã NÑ nñ OÕ oõ Ligatures AEÆ aeæ OEŒ oeœ Eth & Thorn DÐ dð THÞ thþ German sharp s & long s ß ſ Quote Link to comment https://forums.phpfreaks.com/topic/52821-solved-iso-8859-versus-utf-8/#findComment-260890 Share on other sites More sharing options...
448191 Posted May 24, 2007 Share Posted May 24, 2007 More proof: http://www.utf8-chartable.de/ Quote Link to comment https://forums.phpfreaks.com/topic/52821-solved-iso-8859-versus-utf-8/#findComment-260893 Share on other sites More sharing options...
jwhite68 Posted May 24, 2007 Author Share Posted May 24, 2007 I think I have been misled by too many postings that suggest that you simply have to use iso-8859 to display accents. I have finally worked out a solution, tested it and it works. The solution was to open my PHP file with all the regions in (it was populated a series of region arrays per country) - using the EM Editor. Then, choose 'save as' and select utf-8 encoding. After saving with utf-8 encoding, and uploading to website, works a treat. So it seems it was my mistake. Hopefully others who have been misled will pick up on this too. The version of EM Editor you need is the FREE one, which works a treat. Quote Link to comment https://forums.phpfreaks.com/topic/52821-solved-iso-8859-versus-utf-8/#findComment-260929 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.