[Javascript] 關於 unicode

在 Javascript – The Good Parts 這本書裡面,Douglas Crockford 是這樣說的:
“JavaScript was designed at a time when Unicode was expected to have at most 65,536 characters. It has since grown to have a capacity of more than 1 million characters.
JavaScript’s characters are 16 bits. That is enough to cover the original 65,536 (which is now known as the Basic Multilingual Plane). Each of the remaining million characters can be represented as a pair of characters. Unicode considers the pair to be a single character. JavaScript thinks the pair is two distinct characters.”

我沒有真的深入這個問題,所以一直很好奇在中文使用上,Javascript 有沒有出過什麼大問題。 不過目前在社群裡面問的結果是,大家似乎都沒遇過什麼問題… :p



Be the first to comment

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.