Shift JIS (SJIS) and UTF-8 are both character encoding systems used to represent text in computers. Shift JIS is primarily used for Japanese characters, while UTF-8 is a more universal encoding that covers a wide range of characters from various languages.
When you open a Shift JIS encoded file on a non-Japanese device, the characters may appear garbled or incorrectly displayed. This is because the non-Japanese device does not understand the Shift JIS encoding.
So, that's why I'm sharing this, but i supposed we could do this with other encoding types.
On backend, just make sure to set your character set to Shift_JIS
.
If there are some weird character appears, we might need to tweek the string a bit, since in Shift_JIS
, each character is encoded using 2 bytes (16 bits), while in UTF-8
, it takes 1-4 bytes depending on the characters.
Here's the ASCII table incase you need it.
On frontend, add media type when you create the download link.
That's it! It's not much but i hope it helpful somehow.
Thank you for reading.