-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This repository is part of a larger project!
Unicode comes with different encoding standards. These are
-
UTF-8
-
UTF-16
-
UTF-32
-
UCS-2
Before unicode, there was the ANSI standard which still can be used. ANSI it seems does not allow to employ more than one chosen language and its characters.
To adapt effectively ANSI or UTF-8, a file has to be safed with one of both properties. These options should be adjustable in an editor or else the editor shouldn´t be used.
Also there exists a UTF-8 BOM(byte order mark). BOM tells if a string is encoded in big-endian or little-endian. An example shows the picture by Richard Ishida, W3C1 below:
The "U +" for every character identifies it as an unicode.
UTF-8 is recommended, because the other unicode standards are either outdated or hard to handle for Javascript without using an extern library(For more information please read the sources!).
When unicode is appointed, it allows to use special characters like "ü", "Ä", "ö", etc. in or as variable names.
The project contains two folders:
-
"ANSI" folder contains the project files which have the ANSI property
-
"UTF-8" folder contains the project files which have the UTF-8 without BOM property
The user interaction part, after using the default input value, could look like the content as seen below by starting "index.html" in a web browser.
The colored areas are just for a better readability in the wiki and are not part of the content. To use the project just download the files and execute "index.html". Note that all files should be placed in the same folder so that the functionality of the code is guaranteed.
The user interaction part, after using the default input value, could look like the content as seen below by starting "index.html" in a web browser.
Using unicode characters here will as expected not work! The characters are shown as questionmarks.
Note that all files should be placed in the same folder so that the functionality of the code is guaranteed.
This knowledge was gained:
-
Effective JavaScript "68 Specific Ways to Harness the Power of JavaScript" by David Herman
-
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) by Joe Spolsky
-
Unicode and JavaScript by Dr. Axel Rauschmayer
-
Superscript 1 - What is a byte-order mark? by Richard Ishida, W3C