unicodes of chinese characters

It is to my surprise that other than Big5 or GB coding of chinese characters, in UTF-8 coding of chinese character, I discovered the two difference set of coding when I use javascript for such encodings. Natively javascript will encode any chinese characters or unicodes greater than 0xFFFF.  A surrogate pair of unicode codes are used to represent that character and so it is considered as a 4 bytes code. The two byte version can only displayed properly in local computer.

Here I will show the difference when these codes are displayed under different applications:

same character coded differently
Same Han character coded with 2 bytes and 4 bytes