How to enable users to type Unicode characters in a web application? More specific, my users need to type the Dutch IJ and ij (Unicode: IJ
and ij
).
So I read Wikipedia and related sources, to find out it is perfectly fine to type those characters in Microsoft Word and Wordpad using ALT codes 0306
and 0307
. In notepad however I get 2
and 3
instead. I was thinking this had something to do with simple notepad not being able to cope with multibyte encodings. But even Firefox 58 and Internet Explorer show 2
and 3
instead of the Unicode characters, when the webpage has Unicode enabled and <html lang="nl">
set. The page is rendered with the "Arial MS Unicode" font just like Word, to be sure that as much as possible Unicode characters are displayed correctly. My test machine runs Windows 8.1 with Internet Explorer set to Dutch, with also a Dutch version of Firefox.
So now users copy and paste from Word and Wordpad to their browsers which is pretty cumbersome. And obviously this method does not work on most computers (laptops, mobile phones) nowadays, because they don't have a numeric pad on their keyboard.
Others have similar issues. There is even a pragmatic tool to work around the problem.
It appears that typing ALT codes with a leading 0
has worked in the past on Windows XP and 2003, but setting a registry value for this to work on all clients is not an acceptable solution.
Isn't there a common solution to this human to browser barrier? Some JS API perhaps?