From: Pen Ttt on
in my linux comsole:
ghex2 /home/pt/myday
there is the first line content
AA3F3201861F0000D61F0000
would you mind to tell me how can convert it into utf-8?
--
Posted via http://www.ruby-forum.com/.

From: Brian Candler on
Pen Ttt wrote:
> in my linux comsole:
> ghex2 /home/pt/myday
> there is the first line content
> AA3F3201861F0000D61F0000
> would you mind to tell me how can convert it into utf-8?

What do you meant "convert to utf-8"?

Those hex characters are very unlikely to be UTF-8. See
http://en.wikipedia.org/wiki/UTF-8

AA = second, third or fourth byte of multi-byte sequence
3F = single-byte character (?)
32 = single-byte character (2)
01 = single-byte character (ctrl-A)
86 = second, third or fourth byte of multi-byte sequence
1F = single-byte character (ctrl-?)
... etc

Apart from D6 there are no "start of n-byte sequence" characters

Try typing "file /home/pt/myday", which will attempt to identify what
sort of file you actually have.

--
Posted via http://www.ruby-forum.com/.

From: Pen Ttt on
pt(a)pt-laptop:~$ file /home/pt/myday
/home/pt/myday: data


--
Posted via http://www.ruby-forum.com/.

From: Pen Ttt on
would you mind to tell me your email? i can send the data file to
you,please help me,think you in advance.

--
Posted via http://www.ruby-forum.com/.

From: Brian Candler on
Pen Ttt wrote:
> pt(a)pt-laptop:~$ file /home/pt/myday
> /home/pt/myday: data

'file' knows many file formats - look at /usr/share/file/magic or
/etc/magic depending on your system. But this isn't one of them. Neither
is the data UTF-8 text, or at least, the header isn't.

You could look to see if there are any snippets of readable text in it:

strings /home/pt/myday | less

But if not, then it really is just binary data, and its meaning will
depend on what program wrote it in the first place.
--
Posted via http://www.ruby-forum.com/.