5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

文字コードの5C問題とは

Posted at

概要

Shift-JISでは「5C」のコードは¥を意味しており、エスケープ記号として解釈されることに起因する問題。

具体例

  1. 「表示 (95 5c 8E A6)」という文字がある。
  2. 「5c」がエスケープ文字と判断される(8Eをエスケープすると解釈)
  3. 結果的に「侮ヲ(95 8E A6)」となってしまう。

対応策は?

  • Shift-JISじゃなくて、UTF-8を使う。
  • アプリ側でマルチバイト対応の関数を使う。

参考文献

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?