diff options
Diffstat (limited to '')
-rw-r--r-- | src/utfstring.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utfstring.cpp b/src/utfstring.cpp index 3f57618..19d3ddc 100644 --- a/src/utfstring.cpp +++ b/src/utfstring.cpp | |||
@@ -121,7 +121,7 @@ void Bu::UtfString::setUtf8( const Bu::String &sInput ) | |||
121 | 121 | ||
122 | void Bu::UtfString::setUtf16( const Bu::String &sInput ) | 122 | void Bu::UtfString::setUtf16( const Bu::String &sInput ) |
123 | { | 123 | { |
124 | Bu::String::const_iterator i = sInput.begin(); | 124 | // Bu::String::const_iterator i = sInput.begin(); |
125 | if( (uint8_t)*sInput.begin() == 0xFF && | 125 | if( (uint8_t)*sInput.begin() == 0xFF && |
126 | (uint8_t)*(sInput.begin()+1) == 0xFE ) | 126 | (uint8_t)*(sInput.begin()+1) == 0xFE ) |
127 | { | 127 | { |
@@ -311,9 +311,9 @@ void Bu::UtfString::writeUtf8( Bu::Stream &sOut ) | |||
311 | // 111 111111 111111 111111 | 311 | // 111 111111 111111 111111 |
312 | uByte = (chr>>18)|0xF0; | 312 | uByte = (chr>>18)|0xF0; |
313 | sOut.write( &uByte, 1 ); | 313 | sOut.write( &uByte, 1 ); |
314 | uByte = (chr>>12)&0x3F|0x80; | 314 | uByte = ((chr>>12)&0x3F)|0x80; |
315 | sOut.write( &uByte, 1 ); | 315 | sOut.write( &uByte, 1 ); |
316 | uByte = (chr>>6)&0x3F|0x80; | 316 | uByte = ((chr>>6)&0x3F)|0x80; |
317 | sOut.write( &uByte, 1 ); | 317 | sOut.write( &uByte, 1 ); |
318 | uByte = (chr&0x3F)|0x80; | 318 | uByte = (chr&0x3F)|0x80; |
319 | sOut.write( &uByte, 1 ); | 319 | sOut.write( &uByte, 1 ); |
@@ -324,7 +324,7 @@ void Bu::UtfString::writeUtf8( Bu::Stream &sOut ) | |||
324 | // 1111 111111 111111 | 324 | // 1111 111111 111111 |
325 | uByte = (chr>>12)|0xE0; | 325 | uByte = (chr>>12)|0xE0; |
326 | sOut.write( &uByte, 1 ); | 326 | sOut.write( &uByte, 1 ); |
327 | uByte = (chr>>6)&0x3F|0x80; | 327 | uByte = ((chr>>6)&0x3F)|0x80; |
328 | sOut.write( &uByte, 1 ); | 328 | sOut.write( &uByte, 1 ); |
329 | uByte = (chr&0x3F)|0x80; | 329 | uByte = (chr&0x3F)|0x80; |
330 | sOut.write( &uByte, 1 ); | 330 | sOut.write( &uByte, 1 ); |