Bug 441833 - Additional charset conversion is performed.
Summary: Additional charset conversion is performed.
Alias: None
Product: Fedora
Classification: Fedora
Component: smbldap-tools   
(Show other bugs)
Version: 8
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Paul Howarth
QA Contact: Fedora Extras Quality Assurance
URL: https://gna.org/bugs/index.php?11717
Depends On:
TreeView+ depends on / blocked
Reported: 2008-04-10 14:07 UTC by Marek Greško
Modified: 2008-07-30 22:25 UTC (History)
0 users

Fixed In Version: 0.9.5-2.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-30 22:25:11 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch to assume UTF8 locale (1.24 KB, patch)
2008-05-22 15:51 UTC, Paul Howarth
no flags Details | Diff

Description Marek Greško 2008-04-10 14:07:31 UTC
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):

How reproducible:

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
Actual results:
It converts UTF-8 strings to UTF-8 as if it is ISO-8859-1.

Expected results:
No conversion.

Additional info:
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.

Comment 1 Paul Howarth 2008-04-11 15:29:33 UTC
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.

Comment 2 Marek Greško 2008-04-14 11:12:48 UTC
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.

Comment 3 Paul Howarth 2008-05-22 15:51:35 UTC
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?

Comment 4 Paul Howarth 2008-05-22 16:24:44 UTC
I've also raised an upstream ticket on this issue:


Comment 5 Paul Howarth 2008-06-28 09:01:52 UTC
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.

Comment 6 Fedora Update System 2008-07-08 11:20:18 UTC
smbldap-tools-0.9.5-2.fc8 has been submitted as an update for Fedora 8

Comment 7 Fedora Update System 2008-07-09 02:47:56 UTC
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

Comment 8 Paul Howarth 2008-07-30 22:25:11 UTC
This update is now in the main Fedora 8 updates repository.

Note You need to log in before you can comment on or make changes to this bug.