From 88004d87d513dcba767b1dae1e5199a89b22ce36 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 22 Mar 2011 19:25:42 +0000 Subject: We now have a UTF-8 test parser, I'm going to move it into a functor, I think. --- src/tests/utf.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/tests/utf.cpp (limited to 'src/tests') 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 @@ +#include +#include +#include + +int main( int argc, char *argv[] ) +{ + argc--, argv++; + + for( char **sFile = argv; *sFile; sFile++ ) + { + Bu::File fIn( *sFile, Bu::File::Read ); + Bu::String sUtf8; + char buf[4096]; + while( !fIn.isEos() ) + { + int iAmnt = fIn.read( buf, 4096 ); + sUtf8.append( buf, iAmnt ); + } + Bu::UtfString::debugUtf8( sUtf8 ); + } +} + -- cgit v1.2.3