Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/52821-solved-iso-8859-versus-utf-8/
Share on other sites

I don't get that. All of those are supported by UTF-8:

 

http://www.unics.uni-hannover.de/nhtcapri/multilingual1.html

 

Unicode (UTF-8) test

 

You can use this document to check if your browser and your installed fonts display multilingual HTML documents in Unicode (UTF-8) 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

    ß ſ

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.