Hi all,

I have a problem when trying to read text tables containing Unicode chars in
R 2.10.1 (WinXP, English locale).

An example file is attached.

The following command is supposed to read the table, but the data is only
read incompletely:

read.table("example_unicode.txt", sep="\t", dec=".", header=T, fileEncoding
= "UCS-2LE", fill=T)

  ID a  s  d
1  3 0 NA NA
Warning messages:
1: In read.table("example_unicode.txt", sep = "\t", dec = ".",  :
  invalid input found on input connection 'example_unicode.txt'
2: In read.table("example_unicode.txt", sep = "\t", dec = ".",  :
  incomplete final line found by readTableHeader on 'example_unicode.txt'

The offending unicode characters seem to be \u68ee \u9dd7 \u5916.

Any help is appreciated.

Best regards,
Hilmar
---
Hilmar Berger
Integromics S.L. / CNB-CSIC
Madrid, Spain
ID     a       s       d
3       0       森鷗外     100
4       3,33    øდमाテ하  200
5       50      "ﻣﺼﺮ    "       300
______________________________________________
R-help@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.

Reply via email to