43 from = (
unsigned short*) text.
c_str();
50 from = (
unsigned short*)orig.
c_str();
55 for (text =
""; *from; from++) {
58 if (*from < 0xD800 || *from > 0xDFFF) {
61 else if (*from >= 0xD800 && *from <= 0xDBFF) {
64 if (uchar < 0xDC00 || uchar > 0xDFFF) {
83 else if (uchar < 0x800) {
84 text += 0xc0 | (uchar >> 6);
85 text += 0x80 | (uchar & 0x3f);
87 else if (uchar < 0x10000) {
88 text += 0xe0 | (uchar >> 12);
89 text += 0x80 | ((uchar >> 6) & 0x3f);
90 text += 0x80 | (uchar & 0x3f);
92 else if (uchar < 0x200000) {
93 text += 0xF0 | (uchar >> 18);
94 text += 0x80 | ((uchar >> 12) & 0x3F);
95 text += 0x80 | ((uchar >> 6) & 0x3F);
96 text += 0x80 | (uchar & 0x3F);
#define SWORD_NAMESPACE_START
const char * c_str() const
virtual char processText(SWBuf &text, const SWKey *key=0, const SWModule *module=0)
#define SWORD_NAMESPACE_END