| 1082 | } |
| 1083 | |
| 1084 | txString fxCESU8Decode(txString string, txInteger* character) |
| 1085 | { |
| 1086 | txInteger result; |
| 1087 | string = fxUTF8Decode(string, &result); |
| 1088 | if ((0x0000D800 <= result) && (result <= 0x0000DBFF)) { |
| 1089 | txString former = string; |
| 1090 | txInteger surrogate; |
| 1091 | string = fxUTF8Decode(former, &surrogate); |
| 1092 | if ((0x0000DC00 <= surrogate) && (surrogate <= 0x0000DFFF)) |
| 1093 | result = 0x00010000 + ((result & 0x000003FF) << 10) + (surrogate & 0x000003FF); |
| 1094 | else |
| 1095 | string = former; |
| 1096 | } |
| 1097 | *character = result; |
| 1098 | return string; |
| 1099 | } |
| 1100 | |
| 1101 | txString fxCESU8Encode(txString string, txInteger character) |
| 1102 | { |
no test coverage detected