Skip to content

How to use internationalization of R on Linux?

4 messages · Manish Gupta, Brian Ripley, Milan Bouchet-Valat

#
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.
#
On 15/10/12 08:32, Manish Gupta wrote:
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,
PLEASE do: the 'at a minimum' information asked for there is essential 
to answer your question.
#
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 :
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