Some byte sequences are apparently invalid in Unicode encodings, and I know that some languages (Python for one) throw an error when that happens.
My question is: what happens in Javascript when receiving such a sequence during an XMLHttpRequest
or XDomainRequest
? Does the resulting string:
If 3, then does the charCodeAt
function return a valid character code?
Number 3 happens. It shows the � when displayed, and charCodeAt returns 0xFFFD, the � unicode character.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With