mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Move comment about casts from pg_wchar.
Suggested-by: Thomas Munro <thomas.munro@gmail.com> Discussion: https://postgr.es/m/CA+hUKGLXQUYK7Cq5KbLGgTWo7pORs7yhBWO1AEnZt7xTYbLRhg@mail.gmail.com
This commit is contained in:
@@ -128,6 +128,11 @@ char_is_cased_icu(char ch, pg_locale_t locale)
|
|||||||
(ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
|
(ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XXX: many of the functions below rely on casts directly from pg_wchar to
|
||||||
|
* UChar32, which is correct for the UTF-8 encoding, but not in general.
|
||||||
|
*/
|
||||||
|
|
||||||
static pg_wchar
|
static pg_wchar
|
||||||
toupper_icu(pg_wchar wc, pg_locale_t locale)
|
toupper_icu(pg_wchar wc, pg_locale_t locale)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,8 +45,7 @@
|
|||||||
*
|
*
|
||||||
* 2. When working in UTF8 encoding, we use the <wctype.h> functions.
|
* 2. When working in UTF8 encoding, we use the <wctype.h> functions.
|
||||||
* This assumes that every platform uses Unicode codepoints directly
|
* This assumes that every platform uses Unicode codepoints directly
|
||||||
* as the wchar_t representation of Unicode. (XXX: ICU makes this assumption
|
* as the wchar_t representation of Unicode. On some platforms
|
||||||
* even for non-UTF8 encodings, which may be a problem.) On some platforms
|
|
||||||
* wchar_t is only 16 bits wide, so we have to punt for codepoints > 0xFFFF.
|
* wchar_t is only 16 bits wide, so we have to punt for codepoints > 0xFFFF.
|
||||||
*
|
*
|
||||||
* 3. In all other encodings, we use the <ctype.h> functions for pg_wchar
|
* 3. In all other encodings, we use the <ctype.h> functions for pg_wchar
|
||||||
|
|||||||
Reference in New Issue
Block a user