Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shift JIS
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == HTML written in Shift JIS can still be interpreted to some extent when incorrectly tagged as ASCII, and when the charset tag is in the top of the document itself, since the important start and end of HTML tags and fields (<code><</code>, <code>></code>, <code>/</code>, <code>"</code>, <code>&</code>, <code>;</code>) are encoded as the same bytes as in ASCII, and those bytes do not appear in two-byte sequences. Shift JIS can be used in [[string literal]]s in programming languages such as [[C (programming language)|C]], but a few things must be taken into consideration. Firstly, that the [[escape character]] 0x5C, normally [[backslash]], is the [[halfwidth and fullwidth forms|half-width]] [[yen sign]] (¥) in Shift JIS. If the programmer is aware of this, it would be possible to use <code>printf("ハローワールド¥n");</code> (where ハローワールド is [["Hello, world!" program|Hello, world]] and ¥n is an escape sequence), assuming the I/O system supports {{nowrap|Shift JIS}} output. Secondly, the 0x5C byte will cause problems when it appears as second byte of a two-byte character, because it will be interpreted as an escape sequence, which will mess up the interpretation, unless followed by another 0x5C.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)