Bug 441833 - Additional charset conversion is performed.
Additional charset conversion is performed.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: smbldap-tools (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Paul Howarth
Fedora Extras Quality Assurance
https://gna.org/bugs/index.php?11717
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-10 10:07 EDT by Marek Greško
Modified: 2008-07-30 18:25 EDT (History)
0 users

See Also:
Fixed In Version: 0.9.5-2.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-30 18:25:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 11:51 EDT, Paul Howarth
no flags Details | Diff

  None (edit)
Description Marek Greško 2008-04-10 10:07:31 EDT
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):
smbldap-tools-0.9.4-1.fc8


How reproducible:
Always.

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 11:29:33 EDT
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 07:12:48 EDT
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 11:51:35 EDT
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
characters.

Can you give this a try?
Comment 4 Paul Howarth 2008-05-22 12:24:44 EDT
I've also raised an upstream ticket on this issue:

https://gna.org/bugs/index.php?11717
Comment 5 Paul Howarth 2008-06-28 05:01:52 EDT
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:

http://mirror.city-fan.org/ftp/contrib/sysutils/

I'd appreciate some feedback before I issue these as official Fedora updates.
Comment 6 Fedora Update System 2008-07-08 07:20:18 EDT
smbldap-tools-0.9.5-2.fc8 has been submitted as an update for Fedora 8
Comment 7 Fedora Update System 2008-07-08 22:47:56 EDT
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 18:25:11 EDT
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.