- "Canonicalize identity PREFIX.
-This function downcases PREFIX with Scandinavian alphabet rule.
-
-RFC2812, 2.2 \"Character codes\" says:
- Because of IRC's Scandinavian origin, the characters {}|^ are
- considered to be the lower case equivalents of the characters []\~,
- respectively. This is a critical issue when determining the
- equivalence of two nicknames or channel names."
- (let ((old-table (current-case-table)))
- (unwind-protect
- (progn
- (set-case-table riece-identity-prefix-case-table)
- (downcase prefix))
- (set-case-table old-table))))
+ "Canonicalize identity PREFIX."
+ (let ((i 0)
+ c)
+ (setq prefix (downcase prefix))
+ (while (< i (length prefix))
+ (if (setq c (cdr (assq (aref prefix i)
+ riece-identity-prefix-case-pair-alist)))
+ (aset prefix i c))
+ (setq i (1+ i)))
+ prefix))