[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A bug in cut?



On Wednesday 19 May 2004 01:13 pm, Behdad Esfahbod wrote:
> On Wed, 19 May 2004, Munzir Taha wrote:
> > [mimo at localhost mimo]$ cut -b1 file3
> > �
> >  �
> >   �
> >    �
> >     [mimo at localhost mimo]$
> >
> > Can you notice the ladder shape, the spaces embedded to the left. Even
> > the prompt is affected. cut -b should only display the first byte of each
> > line and they should be aligned in one column. I am sorry if I can't
> > explain it well but I will try again if it's still not clear.
>
> It's quite possible that the problem is with your terminal
> emulator.  You can discover that by redirecting the output from
> cut to a file, and check the file using hexdump, or simply the
> size of the file.


- How hexdump works? If I have a file that contains Arabic-Indic nubmers:
٠
١
٢
٣
٤

hexdump gives:
0000000 a0d9 d90a 0aa1 a2d9 d90a 0aa3 a4d9 000a
000000f

Can you explain to me how to relate these numbers to
0660	ARABIC-INDIC DIGIT ZERO
0661	ARABIC-INDIC DIGIT ONE
0662	ARABIC-INDIC DIGIT TWO
0663	ARABIC-INDIC DIGIT THREE
0664	ARABIC-INDIC DIGIT FOUR

-- 
Munzir Taha  PGP Key available
gpg --recv-keys --keyserver www.mandrakesecure.net F0671821

Telecommunications and Electronics Engineer
Linux Registered User #279362 at http://counter.li.org
Mandrake Club member
Maintainer of Mandrake Arabization Project Status (MAPS)
http://www.arabeyes.org/download/documents/distros/mdkarabicsupport-en/
CIW Designer, ICDL, MOUS
New Horizons CLC
Riyadh, SA