How can I convert a word's HEX code string to Shift JIS encoding?
For example, I have a string:
"90DD92E882F08F898AFA89BB82B582DC82B782A9"
And I want to get the following output:
設定を初期化しますか
How can I convert a word's HEX code string to Shift JIS encoding?
For example, I have a string:
"90DD92E882F08F898AFA89BB82B582DC82B782A9"
And I want to get the following output:
設定を初期化しますか
Assuming you have Java 17+, which added
java.util.HexFormat, then you can useparseHexfollowed by a conversion from the byte array to a string:If you do not have Java 17+, then the related answer I linked to gives an alternative approach instead of
parseHex.I don't have the correct charset/font to show the result in my console, but here is the
strvariable in my debugger: