Skip to content

Fix #316: Support roundtrip character casing

Raymond Toy requested to merge issue-316-support-roundtrip-char-casing into master

Adjust how cmucl determines the case of characters. Basically, only characters, c, such that (char-upcase (char-downcase c)) and (char-downcase (char-upcase c)) produce c are considered to have a case.

For both-case-p, we only consider characters to have both cases if the Unicode category is either Lu or Ll. Previously, we considered a category of Lt as having both cases too.

Lastly, we replace most uses of 127 in char.lisp with a new constant +unicode-lower-limit+. And character code above this value uses the Unicode routines to determine the appropriate properties.

The string casing functions are also updated so that they're consistent with char character casing functions.

Edited by Raymond Toy

Merge request reports