Details
Description
put a local file with Japanese characters to hdfs,
while browsing it in hdfs, it cannot be recognized.
here is the test.c
#include "hdfs.h"
#include <stdio.h>
#include <locale.h>
int main(int argc, char **argv) {
if(!setlocale(LC_CTYPE, "ja_JP"))
printf("0\n");
hdfsFS fs = hdfsConnect("localhost", 9000);
printf("1\n");
const char* writePath = "/tmp/\xF0\xA0\x80\x8B.txt";
printf("2\n");
hdfsFile writeFile = hdfsOpenFile(fs, writePath, O_WRONLY|O_CREAT, 0, 0, 0);
if(!writeFile)
char* buffer = "Hello, World! \xF0\xA0\x80\x8B";
tSize num_written_bytes = hdfsWrite(fs, writeFile, (void*)buffer, strlen(buffer)+1);
if (hdfsFlush(fs, writeFile))
printf("3\n");
hdfsCloseFile(fs, writeFile);
}