Skip to content
Prev 361692 / 398506 Next

Binary Value into Text

Please post in plain text format. Only you have the power to format your 
email the way we will see it... using the default HTML format only leads 
to odd wraparounds and weird characters that you don't know about when you 
send but we have to wade through when we recieve it.

"Character" data is rather more complex now than it used to be in days of 
yore... what with Unicode UTF16 and UTF-8 and so on. You are getting into 
deep water trying to mix binary and text data. (I know enough to know I am 
no expert in this topic.) I highly recommend reading the article by Paul 
Murrell on reading binary data [1], but even that is unlikely to answer 
all the headaches you are diving into and it will probably stop being "on 
topic" for this list pretty quickly.

One key point is that you should read "raw" data, not "character" data 
when getting data out of files, even if they are opened in "binary mode".

[1] Viewing binary files with the hexview package. R News, 7(1):2--8, 
April 2007.
On Mon, 13 Jun 2016, Fahman Khan via R-help wrote:

            
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------