char-upcase を実装する - Unicode

char-upcase を実装する。Unicode の CaseFolding.txt からデータを抽出。

  • C: common case folding, common mappings shared by both simple and full mappings.
  • F: full case folding, mappings that cause strings to grow in length. Multiple characters are separated by spaces.
  • S: simple case folding, mappings to single characters where different from F.
  • T: special case for uppercase I and dotted uppercase I

char-upcase では C + S を利用する。CaseFolding.txt から変換表を作り実装。
まだ titlecase の部分が足りないので、後で追加する。


次は char-titlecase 。そもそも titlecase という言葉自体知らないのので調べる。
Capitalization - Wikipedia, the free encyclopedia を斜め読み。
文章で単語を書くときに、先頭を大文字にすることがあるがそれの仲間っぽい。

In some representations of certain writing systems, the notion of the "first letter" is subtle:

for example, the Croatian digraph 'lj' is considered as a single orthographic letter,

and has a representation as a single Unicode character, but as a capitalized initial, it is written 'Lj',

while in an all-caps text, it is written 'LJ'. The 'Lj' form is called title case.

< んー。UnicodeDataata.txt に title case の変換マッピン項目があるから見てみるか。

追記

char-upcase も間違っていたかも。