Hi, I am working on internationalization of R on linux. I have xml file which has data in Chinese language. I need to read it and plot it. How can i do it using internationalization on linux? Regards -- View this message in context: http://r.789695.n4.nabble.com/How-to-use-internationalization-of-R-on-Linux-tp4646213.html Sent from the R help mailing list archive at Nabble.com.
How to use internationalization of R on Linux?
4 messages · Manish Gupta, Brian Ripley, Milan Bouchet-Valat
On 15/10/12 08:32, Manish Gupta wrote:
Hi, I am working on internationalization of R on linux. I have xml file which has data in Chinese language. I need to read it and plot it. How can i do it using internationalization on linux?
By following the R manuals. If you use a UTF-8 locale there is normally no problem in reading. Plotting depends on the device (unstated here) : see the help for pdf() for example. Note that there are *two* written 'Chinese language': you may need to know which,
Regards -- View this message in context: http://r.789695.n4.nabble.com/How-to-use-internationalization-of-R-on-Linux-tp4646213.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
PLEASE do: the 'at a minimum' information asked for there is essential to answer your question.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
HI,
i need to use simplified chineese. But when i read XML
<barplot>
<cd>
<name>?</name>
<value1>3</value1>
<value2>2.9</value2>
</cd>
<cd>
<name>?</name>
<value1>3.3</value1>
<value2>3</value2>
</cd>
<cd>
<name>??</name>
<value1>2.3</value1>
<value2>2.9</value2>
</cd>
<cd>
<name>?</name>
<value1>3.4</value1>
<value2>2.6</value2>
</cd>
<cd>
<name>??</name>
<value1>3.1</value1>
<value2>2.4</value2>
</cd>
</barplot>
But when i real xml using XML package data is not in chineese format. I
don't know how to read data in chineese language when it in XML format
using UF8. Can u pls help me by posting any working example.
Regards
--
View this message in context: http://r.789695.n4.nabble.com/How-to-use-internationalization-of-R-on-Linux-tp4646213p4646231.html
Sent from the R help mailing list archive at Nabble.com.
Le lundi 15 octobre 2012 ? 05:37 -0700, Manish Gupta a ?crit :
HI,
i need to use simplified chineese. But when i read XML
<barplot>
<cd>
<name>?</name>
<value1>3</value1>
<value2>2.9</value2>
</cd>
<cd>
<name>?</name>
<value1>3.3</value1>
<value2>3</value2>
</cd>
<cd>
<name>??</name>
<value1>2.3</value1>
<value2>2.9</value2>
</cd>
<cd>
<name>?</name>
<value1>3.4</value1>
<value2>2.6</value2>
</cd>
<cd>
<name>??</name>
<value1>3.1</value1>
<value2>2.4</value2>
</cd>
</barplot>
But when i real xml using XML package data is not in chineese format. I
don't know how to read data in chineese language when it in XML format
using UF8. Can u pls help me by posting any working example.
The burden of the reproducible example is on the poster, not one people who reply ! ;-) More seriously, you should really tell us what code you are using to read the file. I know there can be differences according to whether you set internal=TRUE or not when calling xmlTreeParse(), because when internal=FALSE readLines() is used to read the contents of the file. You should also try passing encoding="UTF-8" if your file does not specify it. Regards