0

I have few XML files which are having Japanese characters, when I change it to csv it's japanese characters changed to code point e.g. <U+FA32> some characters like this. I want to keep them as it is and change it to csv or excel format. I tried changing Locale, I tried changing setting of R studio. Nothing is working. The xml contains a lot of data and some fields are having email body which consists raw data with some special characters. Let me show you how my code for changing xml to csv looks like:-

for(f in file)
{
  doc <- xmlParse(f,useInternalNodes = TRUE , fileEncoding='UTF-8');
  xL <- xmlToList(doc, fileEncoding='UTF-8');
  data <- ldply(xL, data.frame, fileEncoding='UTF-8');
  write.csv(data, concat(f,".csv"), row.names = FALSE, fileEncoding='UTF-8')

}

Please help with the solution. If we can change it to csv even with some other ways than R please help.

Ralf Stubner
  • 26,263
  • 3
  • 40
  • 75
KING BHAI
  • 69
  • 7

0 Answers0