'인코딩'에 해당되는 글 1건

  1. 2009/08/25 UTF-16 vs UCS-2
else if (개발)2009/08/25 00:22

In computing, UTF-16 (16-bit Unicode Transformation Format) is a variable-length character encoding for Unicode, capable of encoding the entire Unicode repertoire. The encoding form maps each character to a sequence of 16-bit words. Characters are known as code points and the 16-bit words are known as code units. For characters in the Basic Multilingual Plane (BMP) the resulting encoding is a single 16-bit word. For characters in the other planes, the encoding will result in a pair of 16-bit words, together called a surrogate pair.
UTF-16은 모든 영역의 유니코드를 표현할 수 있는 가변길이 유니코드 인코딩이다. (블라블라...) 기본언어판(BMP, U+0000~U+ffff) 영역은 한개의 16-bit 워드로 인코딩되고, 다른 언어판(U+10000 이상) 영역의 문자는 두개의 16-bit 대행 코드 쌍(surrogate pair)로 인코딩된다.

UCS-2 (2-byte Universal Character Set) is an obsolete character encoding which is a predecessor to UTF-16. The UCS-2 encoding form is identical to that of UTF-16, except that it does not support surrogate pairs and therefore can only encode characters in the BMP range U+0000 through U+FFFF. As a consequence it is a fixed-length encoding that always encodes characters into a single 16-bit value.
UCS-2는 UTF-16의 선배격인 인코딩 방식이다. UCS-2는 대행 코드쌍을 지원하지 않는 걸 빼고는 UTF-16과 똑같다. 따라서, 기본언어판(BMP,  U+0000~U+ffff)만 인코딩 할 수 있다. 결론적으로 16-bit single word 고정길이 인코딩 방식이다.

 code point 문자  UTF-16 UCS-2  심볼
 U+007A  z (BMP 영역)  0X007A  0X007A  z
 U+6C34  물수(BMP 영역)  0x6C34  0x6C34  水
 U+1D11E  높은음자리표
(SMP 영역)
 0XD834 0xDD1E
(대행코드 쌍)
 N/A  

http://ko.wikipedia.org/wiki/UTF-16
http://en.wikipedia.org/wiki/UTF-16/UCS-2
에서 발췌 / 정리
Posted by 심보준