Encode::KR(3pm)
πΈ NAME πΈ
Okay bestie, meet Encode::KR β the Korean Encodings module π. This is the Encode::KR(3pm) page, and itβs here to spill the Korean charset encoding tea, no cap.
β¨ SYNOPSIS β¨
Like, literally just:
use Encode qw/encode decode/;
$euc_kr = encode("euc-kr", $utf8); # loads Encode::KR implicitly
$utf8 = decode("euc-kr", $euc_kr); # ditto
π DESCRIPTION π
This module implements Korean charset encodings. The encodings supported are, and I quote the vibe, as follows β canonical name, alias, description, the whole lineup β¨:
euc-krβ aliases:/\beuc.*kr$/i,/\bkr.*euc$/iβ EUC (Extended Unix Character) πksc5601-rawβ no alias listed β Korean standard code set (as is) πcp949β aliases:/(?:x-)?uhc$/i,/(?:x-)?windows-949$/i,/\bks_c_5601-1987$/iβ Code Page 949 (EUC-KR + 8,822 (additional Hangul syllables) π¦MacKoreanβ no alias listed β EUC-KR + Apple Vendor Mappings πjohabβ alias:JOHABβ A supplementary encoding defined in Annex 3 of KS X 1001:1998 πiso-2022-krβ alias:iso-2022-krβ[RFC1557]β
To find how to use this module in detail, see Encode π«Ά.
π BUGS π
Okay so hereβs the bug-ish tea, bestie π: when you see "charset=ks_c_5601-1987" on mails and web pages, they really mean "cp949" encodings. To fix that, the following aliases are set;
qr/(?:x-)?uhc$/i => '"cp949"'
qr/(?:x-)?windows-949$/i => '"cp949"'
qr/ks_c_5601-1987$/i => '"cp949"'
Also, the ASCII region (0x00-0x7f) is preserved for all encodings, even though this conflicts with mappings by the Unicode Consortium π. That caveat is real, fr fr.
π SEE ALSO π
Encodeπ
π This page is from perl v5.42.3, dated 2026-11-03 β Encode::KR(3pm) bestie, slay and goodbye! π«Άπ
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms