summaryrefslogtreecommitdiff
path: root/src/tests/utf.cpp
blob: 9e075e2c92c72e779828abca9025dc52f51b8cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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 us( sUtf8, Bu::UtfString::Utf16 );
		us.debug();
	}
}