Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apparently Some non standard Characters are seen as regular Characters

I make an intentional error using a character that seems nonstandard but is availiable to use:

var ᛨ={};
ᛨ.causeError()

Uncaught TypeError: è.causeError is not a function

Apparently ᛨ character is a version of è character

(a utf-8 normal text character a,b,c is text)

vs

(non text ☎,®,෴,%)

è === http://unicode-table.com/en/00E8/

Encoding      hex             dec (bytes)    dec            binary
UTF-8         C3 A8           195 168        50088          11000011 10101000
UTF-16BE      00 E8           0 232          232            00000000 11101000
UTF-16LE      E8 00           232 0          59392          11101000 00000000
UTF-32BE      00 00 00 E8     0 0 0 232      232            00000000 00000000 00000000 11101000
UTF-32LE      E8 00 00 00     232 0 0 0      3892314112     11101000 00000000 00000000 00000000

ᛨ === http://unicode-table.com/en/16E8/

Encoding      hex            dec (bytes)     dec            binary
UTF-8         E1 9B A8       225 155 168     14785448       11100001 10011011 10101000
UTF-16BE      16 E8          22 232          5864           00010110 11101000
UTF-16LE      E8 16          232 22          59414          11101000 00010110
UTF-32BE      00 00 16 E8    0 0 22 232      5864           00000000 00000000 00010110 11101000
UTF-32LE      E8 16 00 00    232 22 0 0      3893755904     11101000 00010110 00000000 00000000

I don't see the correlation!

How can I test non-standard characters to see if they have a correlation with a normal text character?

What is the relation I would look for?

Out of interest; Is this Unicode issue documented anywhere?

[This question, after further thought, isn't completely solved (see comments)]

like image 824
Ben Muircroft Avatar asked Oct 30 '22 20:10

Ben Muircroft


1 Answers

It tested with a variable called ಠ_ಠ, the error message contains " _ " (space underscore space). It looks like the code that writes error messages doesn't support as many characters as it should.

The same issue happens in the console, so it's not a file encoding problem. Plus the characters are managed without any issue EXCEPT in automated error messages. Even writing throw new Error("ಠ_ಠ"); works without a problem.

That seems like a rather specific bug, but it affects both Chrome and Firefox.

like image 175
Domino Avatar answered Nov 03 '22 00:11

Domino