summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/gbk.c
Commit message (Collapse)AuthorAgeFilesLines
* The problem is: currently our single byte ctype(3) functions are brokenache2007-10-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | for wide characters locales in the argument range >= 0x80 - they may return false positives. Example 1: for UTF-8 locale we currently have: iswspace(0xA0)==1 and isspace(0xA0)==1 (because iswspace() and isspace() are the same code) but must have iswspace(0xA0)==1 and isspace(0xA0)==0 (because there is no such character and all others in the range 0x80..0xff for the UTF-8 locale, it keeps ASCII only in the single byte range because our internal wchar_t representation for UTF-8 is UCS-4). Example 2: for all wide character locales isalpha(arg) when arg > 0xFF may return false positives (must be 0). (because iswalpha() and isalpha() are the same code) This change address this issue separating single byte and wide ctype and also fix iswascii() (currently iswascii() is broken for arguments > 0xFF). This change is 100% binary compatible with old binaries. Reviewied by: i18n@
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-091-4/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* . Static'ize functions exported via function reference variables only.phantom2005-02-271-9/+10
| | | | | | | | | | | | . Replace inclusion of sys/param.h to sys/cdefs.h and sys/types.h where appropriate. . move _*_init() prototypes to mblocal.h, and remove these prototypes from .c files . use _none_init() in __setrunelocale() instead of duplicating code . move __mb* variables from table.c to none.c allowing us to not to export _none_*() externs, and appropriately remove them from mblocal.h Ok'ed by: tjr
* Use a simpler and faster buffering scheme for partial multibyte characters.tjr2004-05-171-26/+40
|
* Fix braino in previous: check that the second byte in the charactertjr2004-05-131-1/+1
| | | | | buffer is non-null when the character is two bytes long, not when the buffer is two bytes long.
* Move prototypes of various encoding-related functions into a new headertjr2004-05-121-5/+1
| | | | file to avoid extern'ing them all over the place.
* In the absence of proper validation, at least check that null bytestjr2004-05-111-0/+4
| | | | do not appear as anything but the first byte of a multibyte character.
* Perform some basic validation of multibyte conversion state objects.tjr2004-04-121-2/+15
|
* Don't cast away const qualifiers.tjr2004-04-101-1/+1
| | | | Spotted by: bde
* Allow partial multibyte characters to accumulate in conversion statetjr2004-04-071-9/+39
| | | | | objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required by C99.
* First byte of GBK-like sequences is 0x81, not 0x80ache2003-12-191-1/+1
|
* Remove unused #includes.tjr2003-11-081-2/+0
|
* Implement mbrtowc() and wcrtomb() directly (sync with big5.c).tjr2003-11-051-53/+50
|
* Add GBK encodingache2003-06-011-0/+116
PR: 51504 Submitted by: Statue <statue@freebsd.sinica.edu.tw>
OpenPOWER on IntegriCloud