aboutsummaryrefslogtreecommitdiff
path: root/src/tests/utf.cpp
blob: 59d49c64140b74d9401bf47e72225e0874ecaf08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <bu/file.h>
#include <bu/string.h>
#include <bu/utfstring.h>

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 );
	}
}