how to use the readBin ?
i want to write the extended ascii character `Œ` into a file named c:/testbin,
and read it in the R console ,display it as  `Œ` in R console.
now i can write it .


zz <- file("c:/testbin", "wb")
writeBin(charToRaw("\u0152"), zz)
close(zz)

when i open the file with office(encoding=utf-8),i can see `Œ`,whay i can not 
read it with readBin?

> zz <- file("c:/testbin", "rb")
> readBin(zz,raw())->x
> x
[1] c5
> readBin(zz,character())->x
Warning message:
In readBin(zz, character()) :
  incomplete string at end of file has been discarded
> x
character(0)

how can i read it?
        [[alternative HTML version deleted]]

______________________________________________
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