Bug 3472 - smbclient's ls doesn't pad correctly with utf-8 characters
Summary: smbclient's ls doesn't pad correctly with utf-8 characters
Status: NEW
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.0.21a
Hardware: x86 Linux
: P3 trivial
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
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