Skip to content

Instantly share code, notes, and snippets.

@acevif
Created December 22, 2022 06:01
Show Gist options
  • Select an option

  • Save acevif/b42f9bb6c542e9273d3f1277546ca163 to your computer and use it in GitHub Desktop.

Select an option

Save acevif/b42f9bb6c542e9273d3f1277546ca163 to your computer and use it in GitHub Desktop.
Unicode memo
  • 全角/半角
  • 文字とは?
    • バイト
      • オクテット=8bitに概ね等しい
    • コードユニット(code unit)
      • 特定のエンコーディングにおける基本単位。コードポイントは1つかそれ以上のコードユニットの列で表される。
      • UTF-8では1コードユニットは1バイト, UTF-16では2バイト, UTF-32では4バイト
    • コードポイント(code point)
      • U+なんとかかんとかで表されるのがコードポイント
    • 書記素クラスタ(grapheme cluster)
      • エンドユーザが思う「1文字」はこれ
      • 1つかそれ以上のコードポイントによって表される
  • BOM
    • UTF-8にBOMがついているとうまく処理できない処理系がある
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment