Description of problem:
smbldap-tools converts UTF-8 strings as if it is ISO-8859-1 to UTF-8 again.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create user with given name or surname with UTF-8 characters.
2. read that strings
3. strings is utf-8 after converting from utf-8 to iso-8859-1
It converts UTF-8 strings to UTF-8 as if it is ISO-8859-1.
The bug can be easily solved by editing smbldap_tools.pm. The functions
utf8Encode and utfDecode should return $arg without calling to_utf8 and from_utf8.
Looking at the code, it seems that smbldap_tools.pm assumes that input is
iso-8859-1 and then just converts it to utf-8. Given that Fedora is "UTF-8
everywhere", it makes sense to me to remove this bogus conversion. An additional
benefit of this is that we can lose a bunch of UTF-8 conversion perl module
dependencies whilst we're at it.
Just for curiosity. My name here in bugzilla (as a reporter) in this thread is
converted the same way... just do not convert. I do not know ehther it is a bug
in bugzilla, or bad local setup of bugzilla.
Created attachment 306394 [details]
Proposed patch to assume UTF8 locale
I think in the long term it would be better for the tools to be able to cope
with varying locales but default to UTF8. So with that in mind I've kept the
conversion functions but effectively made them no-ops by having them convert
from UTF8 to UTF8. I've also tweaked the read_user and read_user_human_readable
functions to handle UTF8 text better, i.e. not just outputting **UNPRINTABLE**
when it comes across non-ASCII characters that are actually printable UTF8
Can you give this a try?
I've also raised an upstream ticket on this issue:
smbldap-tools-0.9.5-2 packages including my alternative patch (and also proposed
fixes for Bug #447758 and Bug #430105) can be found here:
I'd appreciate some feedback before I issue these as official Fedora updates.
smbldap-tools-0.9.5-2.fc8 has been submitted as an update for Fedora 8
smbldap-tools-0.9.5-2.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update smbldap-tools'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-6199
This update is now in the main Fedora 8 updates repository.