void do_tests() {
  string tmp = "千里江陵一日还";

  ASSERT_EQ(({ 0xc7, 0xa7, 0xc0, 0xef, 0xbd, 0xad, 0xc1, 0xea, 0xd2, 0xbb, 0xc8, 0xd5, 0xbb, 0xb9}), string_encode(tmp, "gbk"));

  ASSERT_EQ(({ 0xa4, 0x64, 0xa8, 0xbd, 0xa6, 0xbf, 0xb3, 0xae, 0xa4, 0x40, 0xa4, 0xe9, 0x3f}), string_encode(tmp, "big5"));

  ASSERT_EQ(tmp, string_decode(buffer_transcode(string_encode(tmp, "utf8"), "utf8", "gbk"), "gbk"));
}
