중국어 문자 유니코드, GBK 및 GB18030 코드 변환기
Paste characters to see their Unicode, UTF-8 and GBK codes in a table, copy \u escapes or HTML entities, and preview the mojibake when UTF-8 is read as GBK.
브라우저에서 실행됩니다. 파일은 기기 밖으로 나가지 않습니다. 확인하는 방법 보기
…
사용 방법
- 1문자 붙여넣기
중국어 텍스트를 입력하거나 붙여넣습니다.
- 2표를 읽어봐
각 문자 코드 포인트, UTF-8 바이트 및 GBK 코드를 참조하십시오.
- 3복사 탈출
Copy \u escapes or HTML entities.
- 4모지바이크를 확인해
미리보기판과 당신이 가지고 있는 왜곡된 텍스트를 비교해 보세요.
이 도구 소개
Chinese text is stored in computers with different encodings. Unicode gives every character a code point, such as U+4E2D for 中, and UTF-8, the encoding of the web, stores most Chinese characters in three bytes. Older Chinese systems, Windows programs, many government and banking files and CSV exports from Excel in Chinese locales still use GBK, which stores Chinese characters in two bytes and is a subset of the national standard GB 18030, mandatory for software sold in China. When a file is read with the wrong encoding, Chinese turns into garbage known as mojibake: UTF-8 bytes read as GBK produce strings such as 涓枃. This converter shows, for each character, the code point, the UTF-8 bytes and the GBK code, generates \u escapes for code and HTML numeric entities, and previews what your text looks like when its UTF-8 bytes are misread as GBK, so you can recognise and diagnose the problem.
Who this is for
Developers handling Chinese text in files and databases, data analysts opening CSV files, translators and localisation engineers, and anyone puzzled by garbled Chinese.
Unicode and UTF-8
Unicode assigns a number to each character. UTF-8 writes code points from U+0800 to U+FFFF, which covers common Chinese characters, as three bytes; rare characters in the extension blocks beyond U+FFFF use four bytes.
GBK and GB18030
GBK covers about 21,000 Chinese characters and symbols in two-byte codes. GB 18030 extends it to cover all of Unicode with one-, two- and four-byte codes; since 2023 the 2022 edition of the standard applies to software sold in China. The tool looks up two-byte GBK codes using the browser's encoding support. Characters outside GBK, such as the euro sign in some tables or rare characters, show a dash.
Mojibake
When UTF-8 Chinese is read as GBK, every three bytes are split into odd pairs and produce wrong characters; the preview shows the result. The reverse problem, GBK files opened as UTF-8, usually shows replacement characters. Recognising the pattern tells you which encoding to choose when reopening the file.
Escapes and entities
\u escapes are used in JavaScript, JSON and Java strings. HTML numeric entities such as 中 display characters in web pages regardless of the page encoding.
Fixing files
To fix a CSV that shows mojibake in Excel, open it with the data import function and choose the correct encoding, or save it as UTF-8 with a byte order mark. In code, read files with the encoding they were written in, then convert.
Worked example
For 中文汉字, the table shows U+4E2D, U+6587, U+6C49 and U+5B57, UTF-8 bytes such as E4 B8 AD and GBK codes D6D0, CEC4, BABA and D7D6. Misread as GBK, the UTF-8 bytes appear as 涓枃姹夊瓧.
Limits
A lookup and diagnosis aid, not official advice. The browser's encoding support decides GBK codes.
풀이 예시
中 = U+4E2D, UTF-8 E4 B8 AD, GBK D6D0; 中文汉字 in UTF-8 read as GBK shows 涓枃姹夊瓧.
한눈에 보기
- 카테고리: 개발 및 데이터
- 브라우저에서 실행되며 가입도 업로드도 필요 없습니다.
- 입력한 정보는 기기에 머뭅니다.
- 영어로 제공됩니다.
- 콘텐츠 최종 검토일:
- 공식 출처: The Unicode Standard, GB 18030-2022 and the GBK code table (decoded by the browser's encoding API)
자주 묻는 질문
中의 유니코드 코드는 무엇입니까?
U+4E2D
UTF-8에서 중국 문자는 몇 바이트를 걸까요?
보통 3개, 그리고 U+FFFF를 넘어서는 4개의 희귀한 문자를 사용합니다.
GBK와 GB18030의 차이점은 무엇일까요?
GB 18030은 모든 유니코드를 포함하도록 GBK를 확장하고 의무적인 국가 표준입니다.
왜 내 CSV에 이상한 문자가 표시되는가?
아마도 한 코딩으로 저장되어 다른 코딩으로 열렸을 겁니다. 올바른 코딩으로 다시 열어요.
HTML 엔티티는 뭘 위한 것이냐?
웹 페이지의 문자를 표시합니다.
내 문자가 업로드 되었나요?
아니, 변환은 브라우저에서 합니다.
