| 1046 | } |
| 1047 | |
| 1048 | txSize fxUTF8Length(txInteger character) |
| 1049 | { |
| 1050 | txSize length; |
| 1051 | if (character < 0) |
| 1052 | length = 0; |
| 1053 | else if (character == 0) |
| 1054 | length = 2; |
| 1055 | else if (character < 0x80) |
| 1056 | length = 1; |
| 1057 | else if (character < 0x800) |
| 1058 | length = 2; |
| 1059 | else if (character < 0x10000) |
| 1060 | length = 3; |
| 1061 | else if (character < 0x110000) |
| 1062 | length = 4; |
| 1063 | else |
| 1064 | length = 0; |
| 1065 | return length; |
| 1066 | } |
| 1067 | |
| 1068 | #if mxCESU8 |
| 1069 |