[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More explicit support for Unicode title case

From: Julian Graham
Subject: Re: More explicit support for Unicode title case
Date: Tue, 22 Dec 2009 00:37:59 -0500

Hi Ludovic,

Thanks for the feedback!

> Please wrap lines to 80 characters.


> I’d remove this function altogether because with SRFI-14 one can just
> use ‘(char-set-contains? char-set:title-case chr)’ if that’s what’s
> intended.  Given the definition of ‘char-set:title-case’, I expect it to
> be rarely useful, though.
> What do you think?

I agree -- I did think it was weird that (char-title-case?
(char-titlecase x)) could sometimes return #f.  Done.

> At first I wondered how this would differ from ‘char-upcase’.  IIUC it
> differs in a few cases, namely Dž and the other members of
> ‘char-set:title-case’.  I think it’d be nice to mention at least one
> example to illustrate the difference.


>> +SCM_API scm_t_wchar scm_c_titlecase (scm_t_wchar c);
> I think it should be documented in the manual.

Actually, I'm going to hold off on this, since documenting this would
require at least some explanation of scm_t_wchar, which seems to me to
be outside the scope of this patch.  I'm happy to add documentation
for this (as well as the other wchar functions), although some context
from the originator of that typedef (`git blame' says it was Mike
Gran) would be useful.

>> +  (pass-if "char-locale-titlecase-Dz"
> Maybe “char-locale-titlecase Dž”.

Done, although I actually used "D" plus U+017E instead of U+01F1,
since Emacs doesn't seem to handle digraphs very well.

>> +  (pass-if "string-locale-titlecase"
>> +    (and (string=? "Tt" (string-locale-titlecase "tt"))
> Maybe a longer string otherwise it looks as though it were one of these
> special cases.  ;-)

Done, pushed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]