This commit is contained in:
Jonathan Campbell
2019-03-18 01:00:05 -07:00
parent 881a075428
commit 0d3d1e5ebd

View File

@@ -35,6 +35,25 @@ int main() {
x->finish();
}
{
std::string dst;
const char *src = THIS_IS_JAPANESE;
x->set_src(src);
int err = x->string_convert_dest(dst);
if (err < 0) {
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
return 1;
}
cout << "Test 1: " << src << endl;
cout << " Res: " << dst << endl;
cout << " Read: " << x->get_src_last_read() << endl;
cout << " Wrote: " << x->get_dest_last_written() << endl;
}
{
char tmp[512];
const char *src = THIS_IS_JAPANESE;