guile-devel
[Top][All Lists]
Advanced

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

Minor queries about Unicode char docs


From: Neil Jerram
Subject: Minor queries about Unicode char docs
Date: Mon, 31 Aug 2009 11:21:57 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

First of all, thanks for making these docs (specifically, commit
3f12aed) so clear.  They seem so much clearer and simpler to me than
the months of back-and-forth discussion on r6rs-discuss.  I know those
things are not really comparable, but I hope you can see what I mean.

Then, a couple of queries.

 SCM_DEFINE1 (scm_char_less_p, "char<?", scm_tc7_rpsubr, 
              (SCM x, SCM y),
-            "Return @code{#t} iff @var{x} is less than @var{y} in the Unicode 
sequence,\n"
-            "else @code{#f}.")
+             "Return @code{#t} iff the code point of @var{x} is less than the 
code\n"
+             "point of @var{y}, else @code{#f}.")

I think there's a case here for making the docstring not identical to
the corresponding manual text.  In the manual context, the section
begins with talking about Unicode, so "Unicode" can be assumed for
everything that follows.  But in the docstring, when someone types
(help char<?), they'll just see

  Return `#t' iff the code point of `x' is less than the code
  point of `y', else `#f'.

For this context I think it would be clearer to say

  Return `#t' iff the Unicode code point of `x' is less than the
  code point of `y', else `#f'.

+Case-insensitive character comparisons of characters use @emph{Unicode
+case folding}.  In case folding comparisons, if a character is
+lowercase and has an uppercase form that can be expressed as a single
+character, it is converted to uppercase before comparison.  Unicode
+case folding is language independent: it uses rules that are generally
+true, but, it cannot cover all cases for all languages.

That's very clear, but what if a character doesn't have an uppercase
form that can be expressed as a single character?  Does Guile then
throw an exception, or does it perform the comparison with the
lowercase code point?

Thanks!

     Neil




reply via email to

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