From: Brian Candler Date: 2010-07-12T05:58:04+09:00 Subject: Re: how to convert it into utf-8? 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/.