diff options
Diffstat (limited to '')
-rw-r--r-- | src/tests/utf.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/utf.cpp b/src/tests/utf.cpp new file mode 100644 index 0000000..59d49c6 --- /dev/null +++ b/src/tests/utf.cpp | |||
@@ -0,0 +1,22 @@ | |||
1 | #include <bu/file.h> | ||
2 | #include <bu/string.h> | ||
3 | #include <bu/utfstring.h> | ||
4 | |||
5 | int main( int argc, char *argv[] ) | ||
6 | { | ||
7 | argc--, argv++; | ||
8 | |||
9 | for( char **sFile = argv; *sFile; sFile++ ) | ||
10 | { | ||
11 | Bu::File fIn( *sFile, Bu::File::Read ); | ||
12 | Bu::String sUtf8; | ||
13 | char buf[4096]; | ||
14 | while( !fIn.isEos() ) | ||
15 | { | ||
16 | int iAmnt = fIn.read( buf, 4096 ); | ||
17 | sUtf8.append( buf, iAmnt ); | ||
18 | } | ||
19 | Bu::UtfString::debugUtf8( sUtf8 ); | ||
20 | } | ||
21 | } | ||
22 | |||