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

Re: A bug in cut?



On Wednesday 19 May 2004 09:25 am, Behdad Esfahbod wrote:
> On Wed, 19 May 2004, Munzir Taha wrote:
> > On Wednesday 12 May 2004 06:49 pm, Behdad Esfahbod wrote:
> > > No, you should use "cut -c 1 file", as you mean "a character",
> > > not "a byte".
> >
> > No, behdad, I _don't_ mean a character, I _do_ mean a byte. Isn't an
> > Arabic utf-8 character encoded in two bytes?
>
> That's why if you cut 1 BYTE of the character, what you see looks
> like an space.  What's the problem exactly?


[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.




-- 
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
http://www.arabeyes.org/download/documents/distros/mdkarabicsupport-en/
CIW Designer, ICDL, MOUS
New Horizons CLC
Riyadh, SA