Encode:...JIS2004(3)

πŸ“¦
version 0.04 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Encode::ShiftJIS2004 β€” bestie, this is shift_jis-2004, aka the JIS X 0213 Annex 1 encoding. Yes the whole vibe is in the title, we're being extra on purpose πŸ’…


✨ SYNOPSIS ✨

okay so here's the whole thing, copy-paste ready, no cap:

use Encode::ShiftJIS2004;
use Encode qw/encode decode/;
$bytes = encode("shift_jis-2004", $utf8);
$utf8 = decode("shift_jis-2004", $bytes);

look at that. three lines of setup and you're encoding. iconic behaviour fr fr πŸ¦‹


πŸŽ€ ABSTRACT πŸŽ€

This module provides the following encoding for JIS X 0213:2004 Annex 1. Just the one, and she's serving:

Canonical         Alias                         Description
--------------------------------------------------------------
shift_jis-2004    qr/\bshift.*jis.*2004$/i      shift encoding
--------------------------------------------------------------

so yeah, the canonical name is shift_jis-2004, and the alias regex qr/\bshift.*jis.*2004$/i will also find her. she answers to both, main character energy πŸ‘‘


🌸 DESCRIPTION 🌸

ngl, if you wanna know how to use this module in detail detail β€” like, every last option β€” go read Encode. That's the big one, she's the blueprint. This page is just the little sister 🫢

πŸ’€ Note

okay so this is the part where we need to talk, because this is not forward compatible with "ascii". She does not keep that compatibility β€” what she keeps instead is conformance to the standard. That's the trade, and she chose the standard, periodt.

What that actually means:

  • \x5C and \x7E are mapped from/to YEN SIGN and OVERLINE πŸ’΄
  • REVERSE SOLIDUS and TILDE are mapped to/from multibyte sequences
bestie please read that twice. \x5C is not a backslash here. \x7E is not a tilde here. If your brain is used to ASCII, this is gonna vibe check you. It's intentional, it's standards-compliant, and it is absolutely going to surprise you if you didn't know. 😭

🌈 SEE ALSO 🌈

  • Encode
  • Encode::JISX0213

go read Encode first iykyk, and Encode::JISX0213 is her cousin, say hi 🧚


πŸ’œ AUTHOR πŸ’œ

Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu> β€” the legend herself, we stan 🌟


Copyright (C) 2013 Hatuka*nezumi - IKEDA Soji.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πŸ’…


and that's the whole page bestie! this one shipped as part of perl v5.42.0, dated 2025-07-25, filed under User Contributed Perl Documentation as Encode:...JIS2004(3). go encode something cute, ily, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from