To all of the web design Eldar out there:
I have been making a Tengwar converter webpage that takes the latin script and changes the writing into the Tengwar Annatar font. I have come accross a dilemna: The only special character that doesn't seem to be read is the question mark! Here's the line of code:
if(lett == '\x3F'){
output += '\xc0';
}
'\x3F' is the hexadecimal code for the question mark, but when I try to run the code, it doesn't add the Á character to the variable "output". (second line) I tried replacing the "?" hex code with other strange characters, and the code works!!! If you know why this is happening, please reply!
Leonard W. Nov 30, 2017 (23:47)
Wesley Stump Dec 01, 2017 (03:36)
Wesley Stump Dec 01, 2017 (04:01)
Severin Zahler Dec 05, 2017 (01:43)
Edit: in '\xc0' you used a small letter c, maybe try a small letter in '\x3f'
Wesley Stump Dec 05, 2017 (13:33)
Wesley Stump Dec 05, 2017 (13:34)
Severin Zahler Dec 06, 2017 (00:02)
Check this out: elbisch.ch.diamant.ch-meta.net - - Startseite
The code behind is:
https://i.imgur.com/GHhWNMc.png
As you can see, all sorts of comparisons equal true. You don't need to encode the characters into hex, maybe if your file is not supporting UTF-8 you may need to do it for the non-ASCII characters, but it does not seem to be necessary. One thing I found is to preferrably use === over == to avoid some unwanted behaviour.
Wesley Stump Dec 06, 2017 (01:36)