As in What You See Is What You Don’t Get.
I’d like to ask the brightest forum I know for the answer to a simple question I’m a bit too dense to phrase.
How do get a keystroke from my computer onto an EE generated page and have it look the same, when rendered by EE on the screen, as it does on my keyboard?
To confuse matters I’m using a Mac and an British-English keyset (so, “Latin”. BTW American and French key-sets are also latin, as is Irish; “Irish-Extended” on the other hand uses canonically decomposed Unicode or UTF-8-MAC).
The characters I want to have appear on screen are the artefacts from the French alphabet (acute and grave accents, circumflex, cedilla and the dreaded double-dot). Without going back to root instructions (ASCII-HEX?) I guess my OS is sending a string to my browser which sends it to EE which sends it my mySQL who stores it until EE requests it and presents it to a browser for a user.
Ignoring sort-order (a+umlaut comes after “a” in German and after “z” in Swedish) what would anyone say are the critical variables for achieving the simple nirvana of WYSIWYG in web development?
jiF
Some additional (and random) observations.
I noticed today that whilst keying data into two separate installations of EE, both set to UTF-8, that the French Region of île-de-France when added as a category was not sorted logically (it came after A rather than H). Using phpMyAdmin I can see that on the first installation the Î character was replaced by two glyphs; a capital A with a tilde on top + capital Z with an inverted cedilla). Of course changing EE’s default encoding to ISO-8850-1 and re-keying the values places the correct character into the database and the Î now sorts correctly.
However on the second installation, again with EE set to UTF-8 the sort-order was likewise incorrect however the glyphs when viewed in the database were now capital A with a tilde (corresponding to 00C3 in ISO-8859-1) and the Reg mark (corresponding to 00AE in ISO-8859-1). Again, changing EE to ISO-8859-1 and re-keying the Î character repaired the sort-order and database character.
The difference between the two database values is explained by mySQL on the fist installation being a complete UTF-8/UTF8-general-ci installation and on the second installation being 8859-1/Swedish (even though the database is collated in UTF8).
So it looks very much like for my Mac keyboard I need to set EE to 8859-1 because data coming from me is provided in that format; anything else and EE sends junk to mySQL. And that even though mySQL configuration has a bearing on the nature of the junk (and therefore database configuration is a factor) it is still junk.
Therefore the matra that has been sung to me for weeks; collation, encoding and charset must be the same, must simply be wrong and one critical factor must be the keyboard character-set on the client computer?
Oops; one exception. The EEWiki will become a substantial challenge with foreign glyphs if the character-set and the database encoding are different not both UTF-8; very tricksy.