utf8proc
diff ruby/utf8proc_native.c @ 5:c18366878af9
Version 1.0.2
- included a check in Integer#utf8, which raises an exception, if the given code-point is invalid because of being too high (this was missing yet)
- added support for PostgreSQL version 8.2
- included a check in Integer#utf8, which raises an exception, if the given code-point is invalid because of being too high (this was missing yet)
- added support for PostgreSQL version 8.2
author | jbe |
---|---|
date | Tue Dec 26 12:00:00 2006 +0100 (2006-12-26) |
parents | 4ee0d5f54af1 |
children | fcfd8c836c64 |
line diff
1.1 --- a/ruby/utf8proc_native.c Wed Sep 20 12:00:00 2006 +0200 1.2 +++ b/ruby/utf8proc_native.c Tue Dec 26 12:00:00 2006 +0100 1.3 @@ -122,7 +122,8 @@ 1.4 ssize_t result; 1.5 int uc; 1.6 uc = NUM2INT(code_param); 1.7 - if (uc < 0 || ((uc & 0xFFFF) >= 0xFFFE) || (uc >= 0xD800 && uc < 0xE000) || 1.8 + if (uc < 0 || uc >= 0x110000 || 1.9 + ((uc & 0xFFFF) >= 0xFFFE) || (uc >= 0xD800 && uc < 0xE000) || 1.10 (uc >= 0xFDD0 && uc < 0xFDF0)) 1.11 rb_raise(rb_eArgError, "Invalid Unicode code point"); 1.12 result = utf8proc_encode_char(uc, buffer);