summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/gb18030.c
Commit message (Collapse)AuthorAgeFilesLines
* Implement xlocale APIs from Darwin, mainly for use by libc++. This adds atheraven2011-11-201-9/+12
| | | | | | | | | | | | load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit locale parameter. Also adds support for per-thread locales. This work was funded by the FreeBSD Foundation. Please test any code you have that uses the C standard locale functions! Reviewed by: das (gdtoa changes) Approved by: dim (mentor)
* 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@
* . Static'ize functions exported via function reference variables only.phantom2005-02-271-8/+8
| | | | | | | | | | | | . 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
* 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.
* Perform some basic validation of multibyte conversion state objects.tjr2004-04-121-2/+14
|
* 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-10/+40
| | | | | objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required by C99.
* Reimplement the GB18030 encoding method using the new-style (mbrtowc()/tjr2004-04-041-123/+137
| | | | wcrtomb()) interface.
* Add support for gb18030 encodingache2003-07-291-0/+166
PR: 51729 Submitted by: Kang Liu <liukang@bjpu.edu.cn>
OpenPOWER on IntegriCloud