Bug 3472 - smbclient's ls doesn't pad correctly with utf-8 characters
smbclient's ls doesn't pad correctly with utf-8 characters
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools
3.0.21a
x86 Linux
: P3 trivial
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-31 15:36 UTC by Samuel Thibault
Modified: 2006-01-31 15:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Thibault 2006-01-31 15:36:45 UTC
Hi,

In a UTF-8 locale:

smb: \> ls
  .                                   D        0  Tue Jan 31 23:32:02 2006
  ..                                 DR        0  Thu Apr 15 13:24:39 2004
  é                                           0  Tue Jan 31 23:32:02 2006
smb: \>

Note that size and date is a bit shifted.

Indeed, in UTF-8 encoding, 'é' takes two bytes. But it takes only one displaying character. smbclient should use wcswidth() and others to get the displaying size of unicode strings.

Regards
Samuel