This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: case conversion with Turkish locale


Cumartesi 23 Ekim 2004 00:13 tarihinde, Roland McGrath şunları yazmıştı: 
> > But it is pretty clear that developers are not aware of the situation.
> > Many programs, including the major ones, have this problem. Maybe a note
> > on the glibc documentation[1] can inform them?
>
> Feel free to post a patch with suggested text.

Here is a small patch for ctype.texi.

-- 
Baris Metin
http://www.metin.org
? dir-add.texi
? libm-err-tmp
Index: ctype.texi
===================================================================
RCS file: /cvs/glibc/libc/manual/ctype.texi,v
retrieving revision 1.28
diff -u -r1.28 ctype.texi
--- ctype.texi	21 Apr 2004 19:03:43 -0000	1.28
+++ ctype.texi	25 Oct 2004 13:13:38 -0000
@@ -221,6 +221,13 @@
 may need to write @code{islower(c) ? toupper(c) : c} rather than just
 @code{toupper(c)}.
 
+@strong{Warning:} Use of case conversion functions are
+straightforward. But you must consider a change in the
+byte-count. It's not guaranteed that a upper/lower case of a
+single-byte character will remain single-byte on some unicode locales.
+Using case conversion functions can produce different number of bytes
+(Turkish 'i' and 'I').
+
 These functions are declared in the header file @file{ctype.h}.
 @pindex ctype.h
 
@@ -727,6 +734,12 @@
 convenient shortcuts so that it is not necessary to call @code{wctrans}
 for them.
 
+@strong{Warning:} As mentioned in Case Conversion section, when using
+case conversion functions you must consider a change in the
+byte-count. On some locales, if (assuming a constant byte-count) you
+apply the conversion on a single buffer, your buffer will be ruined or
+at least won't represent a correct result.
+
 @comment wctype.h
 @comment ISO
 @deftypefun wint_t towlower (wint_t @var{wc})

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]