Weltler Rezső - Contenuto Bt.
2008-Aug-06 12:06 UTC
[R] Write greek text to Windows Unicode file
Hi, everybody! I am an experienced senior programmer, but absolutely newbie in R, so excuse me if my question is too silly. I need for my work to evaluete some greek text statistically. The text is in a Windows Unicode file, so I read it in via readLines(...,encoding="UCS-2LE") and it works perfectly! But finally the program has to write out the results (e.g. frequencies, but of course the greek root words too) to an output unicode text file, which could be later read in by another R program or edited by Notepad or MS Word. I tried it with the same method (for examle using cat), but the result, i.e. the output isn't a rightly encoded Windows file. Before sending this email I've searched for an answer to my question in the helps and also in learning guides and have found some hints but no solution. Please do help me! Rezsõ [[alternative HTML version deleted]]
On Wed, 6 Aug 2008, Weltler Rezs? - Contenuto Bt. wrote:> Hi, everybody!> I am an experienced senior programmer, but absolutely newbie in R, so > excuse me if my question is too silly.> I need for my work to evaluete some greek text statistically. The text > is in a Windows Unicode file, so I read it in via> readLines(...,encoding="UCS-2LE")> and it works perfectly! But finally the program has to write out the > results (e.g. frequencies, but of course the greek root words too) to an > output unicode text file, which could be later read in by another R > program or edited by Notepad or MS Word. I tried it with the same method > (for examle using cat), but the result, i.e. the output isn't a rightly > encoded Windows file.It is probably (we have no reproducible example) a correctly encoded Unicode-standard file (the point being that Windows used non-standard BOMs).> Before sending this email I've searched for an answer to my question in the helps and also in learning guides and have found some hints but no solution. > Please do help me!Please do help us to help you by giving the reproducible example the posting guide asked you for.> Rezs? > > [[alternative HTML version deleted]]Please send properly formatted plain text -- I've had to reformat this. -- 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