Mercurial > sdl-ios-xcode
changeset 1519:c99e7a9c9bc9
RFC 3629 restricted the range of characters encoded with UTF-8 to 0000-10FFFF (the UTF-16 accessible range)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 13 Mar 2006 17:25:44 +0000 |
parents | 4d711949cd9a |
children | 5d264facfd03 |
files | src/stdlib/SDL_iconv.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/stdlib/SDL_iconv.c Mon Mar 13 16:56:01 2006 +0000 +++ b/src/stdlib/SDL_iconv.c Mon Mar 13 17:25:44 2006 +0000 @@ -368,7 +368,8 @@ ch = UNKNOWN_UNICODE; } if ( (ch >= 0xD800 && ch <= 0xDFFF) || - (ch == 0xFFFE || ch == 0xFFFF) ) { + (ch == 0xFFFE || ch == 0xFFFF) || + ch > 0x10FFFF ) { /* Skip illegal sequences return SDL_ICONV_EILSEQ; */ @@ -545,7 +546,7 @@ case ENCODING_UTF8: /* RFC 3629 */ { Uint8 *p = (Uint8 *)dst; - if ( ch > 0x7FFFFFFF ) { + if ( ch > 0x10FFFF ) { ch = UNKNOWN_UNICODE; } if ( ch <= 0x7F ) {