mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Core: Unicode support
git-svn-id: svn://ultimatepp.org/upp/trunk@11163 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5f8f4e3a87
commit
1e09ad39fa
3 changed files with 56 additions and 12 deletions
|
|
@ -2189,9 +2189,9 @@ void ConvertCharset(char *t, byte tcharset, const char *s, byte scharset, int n)
|
|||
bool IsLetter(int c) { return (dword)c < 2048 ? uni__info[c] & 0xc0000000 : 0; }
|
||||
bool IsUpper(int c) { return (dword)c < 2048 ? uni__info[c] & 0x40000000 : 0; }
|
||||
bool IsLower(int c) { return (dword)c < 2048 ? uni__info[c] & 0x80000000 : 0; }
|
||||
int ToUpper(int c) { return (dword)c < 2048 ? (uni__info[c] >> 11) & 2047 : c; }
|
||||
int ToLower(int c) { return (dword)c < 2048 ? uni__info[c] & 2047 : c; }
|
||||
int ToAscii(int c) { return (dword)c < 2048 ? (uni__info[c] >> 22) & 0x7f : 0; }
|
||||
int ToUpper(int c) { return (dword)c < 2048 ? (uni__info[c] >> 11) & 2047 : ToUpperRest_(c); }
|
||||
int ToLower(int c) { return (dword)c < 2048 ? uni__info[c] & 2047 : ToLowerRest_(c);; }
|
||||
int ToAscii(int c) { return (dword)c < 2048 ? (uni__info[c] >> 22) & 0x7f : ToAsciiRest_(c); }
|
||||
#endif
|
||||
|
||||
void ToUpper(wchar *t, const wchar *s, int len)
|
||||
|
|
|
|||
|
|
@ -119,13 +119,16 @@ String ToCharset(byte charset, const String& s, byte scharset = CHARSET_DEFAULT
|
|||
|
||||
#ifndef flagSO
|
||||
extern dword uni__info[2048];
|
||||
dword ToUpperRest_(dword c);
|
||||
dword ToLowerRest_(dword c);
|
||||
dword ToAsciiRest_(dword c);
|
||||
|
||||
inline bool IsLetter(int c) { return (dword)c < 2048 ? uni__info[c] & 0xc0000000 : 0; }
|
||||
inline bool IsUpper(int c) { return (dword)c < 2048 ? uni__info[c] & 0x40000000 : 0; }
|
||||
inline bool IsLower(int c) { return (dword)c < 2048 ? uni__info[c] & 0x80000000 : 0; }
|
||||
inline int ToUpper(int c) { return (dword)c < 2048 ? (uni__info[c] >> 11) & 2047 : c; }
|
||||
inline int ToLower(int c) { return (dword)c < 2048 ? uni__info[c] & 2047 : c; }
|
||||
inline int ToAscii(int c) { return (dword)c < 2048 ? (uni__info[c] >> 22) & 0x7f : 0; }
|
||||
inline int ToUpper(int c) { return (dword)c < 2048 ? (uni__info[c] >> 11) & 2047 : ToUpperRest_(c); }
|
||||
inline int ToLower(int c) { return (dword)c < 2048 ? uni__info[c] & 2047 : ToLowerRest_(c); }
|
||||
inline int ToAscii(int c) { return (dword)c < 2048 ? (uni__info[c] >> 22) & 0x7f : ToAsciiRest_(c); }
|
||||
#else
|
||||
bool IsLetter(int c);
|
||||
bool IsUpper(int c);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue