Encode::KR(3perl)
π Encode::KR β Korean Encodings π
okay bestie, gather round, because this is the little module that handles all the Korean charsets, and she is lowkey carrying the whole group chat. This page lives in the Perl Programmers Reference Guide as Encode::KR(3perl) β yes she has her own man page, main character energy fr fr. π
β¨ SYNOPSIS β¨
use Encode qw/encode decode/;
$euc_kr = encode("euc-kr", $utf8); # loads Encode::KR implicitly
$utf8 = decode("euc-kr", $euc_kr); # ditto
see how chill that is? you don't even have to use her directly, she just shows up when you call her name. it's giving "I'll be there before you finish texting" π«Ά
πΈ DESCRIPTION πΈ
so this module implements Korean charset encodings. the ones she supports are, in her own words:
euc-krβ aliases:/\beuc.*kr$/iand/\bkr.*euc$/iβ EUC (Extended Unix Character) πksc5601-rawβ Korean standard code set (as is). no alias, she's unbothered, she's raw, she's authentic β¨cp949β aliases:/(?:x-)?uhc$/i,/(?:x-)?windows-949$/i, and/\bks_c_5601-1987$/iβ Code Page 949 (EUC-KR + 8,822 (additional Hangul syllables)) πMacKoreanβ 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] π¦
and if you wanna know how to use this module in detail detail, go read Encode. she's the big sister page, she has the lore. π
π BUGS π
okay so listen. when you see charset=ks_c_5601-1987 on mails and web pages? bestie. they really mean cp949 encodings. not a vibe, not a drill, just a whole identity crisis happening out there in the wild. π«
to fix that, these aliases are set:
qr/(?:x-)?uhc$/i => '"cp949"'
qr/(?:x-)?windows-949$/i => '"cp949"'
qr/ks_c_5601-1987$/i => '"cp949"'
and also, important one: the ASCII region (0x00-0x7f) is preserved for all encodings, even though this conflicts with mappings by the Unicode Consortium. so likeβ¦ she said what she said, the ASCII stays, periodt. π
ngl this is the part where you don't argue with the module, you just say "thank you for your service" and move on π
π SEE ALSO π
Encode
that's the whole page, you ate that, no crumbs. π thanks for reading, you're literally the bestie of all time, and remember: encode responsibly. π§
this was page Encode::KR(3perl) from perl v5.44.0, dated 2026-10-17 β mwah, stan, bye π
β¨
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms