What is the difference between UTF-8 and Unicode?

前端 未结 15 1174
独厮守ぢ
独厮守ぢ 2020-11-22 17:08

I have heard conflicting opinions from people - according to the Wikipedia UTF-8 page.

They are the same thing, aren\'t they? Can someone clarify?

15条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 17:18

    If I may summarise what I gathered from this thread:

    Unicode 'translates' characters to ordinal numbers (in decimal form).

    à = 224
    

    UTF-8 is an encoding that 'translates' these numbers to binary representations.

    224 = 11000011 10100000
    

    Note that we're talking about the binary representation of 224, not its binary form, which is 0b11100000.

提交回复
热议问题