mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-15 12:08:04 +02:00
fix docs; they said we validated the UTF-8, but we can't possibly detect
2001-05-14 Havoc Pennington <hp@redhat.com> * gutf8.c (g_utf8_get_char): fix docs; they said we validated the UTF-8, but we can't possibly detect partial chars since there's no length arg here, so trying to use this function on invalid UTF-8 is a bad idea.
This commit is contained in:
parent
b902897da5
commit
ebec3d7ce7
@ -1,3 +1,10 @@
|
||||
2001-05-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
|
||||
the UTF-8, but we can't possibly detect partial chars since
|
||||
there's no length arg here, so trying to use this function
|
||||
on invalid UTF-8 is a bad idea.
|
||||
|
||||
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmessages.c (g_log_write_prefix): Avoid using stderr
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-05-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
|
||||
the UTF-8, but we can't possibly detect partial chars since
|
||||
there's no length arg here, so trying to use this function
|
||||
on invalid UTF-8 is a bad idea.
|
||||
|
||||
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmessages.c (g_log_write_prefix): Avoid using stderr
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-05-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
|
||||
the UTF-8, but we can't possibly detect partial chars since
|
||||
there's no length arg here, so trying to use this function
|
||||
on invalid UTF-8 is a bad idea.
|
||||
|
||||
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmessages.c (g_log_write_prefix): Avoid using stderr
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-05-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
|
||||
the UTF-8, but we can't possibly detect partial chars since
|
||||
there's no length arg here, so trying to use this function
|
||||
on invalid UTF-8 is a bad idea.
|
||||
|
||||
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmessages.c (g_log_write_prefix): Avoid using stderr
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-05-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
|
||||
the UTF-8, but we can't possibly detect partial chars since
|
||||
there's no length arg here, so trying to use this function
|
||||
on invalid UTF-8 is a bad idea.
|
||||
|
||||
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmessages.c (g_log_write_prefix): Avoid using stderr
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-05-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
|
||||
the UTF-8, but we can't possibly detect partial chars since
|
||||
there's no length arg here, so trying to use this function
|
||||
on invalid UTF-8 is a bad idea.
|
||||
|
||||
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmessages.c (g_log_write_prefix): Avoid using stderr
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-05-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
|
||||
the UTF-8, but we can't possibly detect partial chars since
|
||||
there's no length arg here, so trying to use this function
|
||||
on invalid UTF-8 is a bad idea.
|
||||
|
||||
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmessages.c (g_log_write_prefix): Avoid using stderr
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-05-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
|
||||
the UTF-8, but we can't possibly detect partial chars since
|
||||
there's no length arg here, so trying to use this function
|
||||
on invalid UTF-8 is a bad idea.
|
||||
|
||||
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmessages.c (g_log_write_prefix): Avoid using stderr
|
||||
|
@ -243,9 +243,10 @@ g_utf8_strlen (const gchar *p, gint max)
|
||||
* @p: a pointer to unicode character encoded as UTF-8
|
||||
*
|
||||
* Convert a sequence of bytes encoded as UTF-8 to a unicode character.
|
||||
* If @p does not point to a valid UTF-8 encoded character, results are
|
||||
* undefined.
|
||||
*
|
||||
* Return value: the resulting character or (gunichar)-1 if @p does
|
||||
* not point to a valid UTF-8 encoded unicode character
|
||||
* Return value: the resulting character
|
||||
**/
|
||||
gunichar
|
||||
g_utf8_get_char (const gchar *p)
|
||||
@ -492,7 +493,7 @@ g_unichar_to_utf8 (gunichar c, gchar *outbuf)
|
||||
/**
|
||||
* g_utf8_strchr:
|
||||
* @p: a nul-terminated utf-8 string
|
||||
* @c: a iso-10646 character/
|
||||
* @c: a iso-10646 character
|
||||
*
|
||||
* Find the leftmost occurence of the given iso-10646 character
|
||||
* in a UTF-8 string.
|
||||
@ -1387,7 +1388,7 @@ g_ucs4_to_utf16 (const gunichar *str,
|
||||
* Validates UTF-8 encoded text. @str is the text to validate;
|
||||
* if @str is nul-terminated, then @max_len can be -1, otherwise
|
||||
* @max_len should be the number of bytes to validate.
|
||||
* If @end is non-NULL, then the end of the valid range
|
||||
* If @end is non-%NULL, then the end of the valid range
|
||||
* will be stored there (i.e. the address of the first invalid byte
|
||||
* if some bytes were invalid, or the end of the text being validated
|
||||
* otherwise).
|
||||
|
9
gutf8.c
9
gutf8.c
@ -243,9 +243,10 @@ g_utf8_strlen (const gchar *p, gint max)
|
||||
* @p: a pointer to unicode character encoded as UTF-8
|
||||
*
|
||||
* Convert a sequence of bytes encoded as UTF-8 to a unicode character.
|
||||
* If @p does not point to a valid UTF-8 encoded character, results are
|
||||
* undefined.
|
||||
*
|
||||
* Return value: the resulting character or (gunichar)-1 if @p does
|
||||
* not point to a valid UTF-8 encoded unicode character
|
||||
* Return value: the resulting character
|
||||
**/
|
||||
gunichar
|
||||
g_utf8_get_char (const gchar *p)
|
||||
@ -492,7 +493,7 @@ g_unichar_to_utf8 (gunichar c, gchar *outbuf)
|
||||
/**
|
||||
* g_utf8_strchr:
|
||||
* @p: a nul-terminated utf-8 string
|
||||
* @c: a iso-10646 character/
|
||||
* @c: a iso-10646 character
|
||||
*
|
||||
* Find the leftmost occurence of the given iso-10646 character
|
||||
* in a UTF-8 string.
|
||||
@ -1387,7 +1388,7 @@ g_ucs4_to_utf16 (const gunichar *str,
|
||||
* Validates UTF-8 encoded text. @str is the text to validate;
|
||||
* if @str is nul-terminated, then @max_len can be -1, otherwise
|
||||
* @max_len should be the number of bytes to validate.
|
||||
* If @end is non-NULL, then the end of the valid range
|
||||
* If @end is non-%NULL, then the end of the valid range
|
||||
* will be stored there (i.e. the address of the first invalid byte
|
||||
* if some bytes were invalid, or the end of the text being validated
|
||||
* otherwise).
|
||||
|
Loading…
x
Reference in New Issue
Block a user