Bug 870433

Summary: pyodbc unicode handling broken on 64bit systems
Product: [Fedora] Fedora Reporter: Martin Wilck <martin.wilck>
Component: pyodbcAssignee: Honza Horak <hhorak>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: hhorak
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: http://code.google.com/p/pyodbc/issues/detail?id=78&can=1&q=UTF-16
Whiteboard:
Fixed In Version: pyodbc-2.1.11-1.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-03 12:59:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Wilck 2012-10-26 13:19:17 UTC
Description of problem:
pyodbc in Fedora 17/18 is missing important fixes for Unicode handling:

http://code.google.com/p/pyodbc/wiki/ReleaseNotes

2.1.8 - 2010-09-06

A major release for Mac OS/X, Unicode, and 64-bit issues, plus a few suggestions. Thanks for the reports and suggestions.

Unicode handling has been completely reworked, fixing a number of issues on platforms where the size of a SQLWCHAR did not match the size of a Python Unicode character. This includes Mac OS/X and most 64-bit Linux distributions.

Version-Release number of selected component (if applicable):
pyodbc-2.1.5-7.fc18.x86_64
freetds-0.91-3.fc17.x86_64
unixODBC-2.3.1-1.fc17.x86_64

See also http://code.google.com/p/pyodbc/issues/detail?id=78&can=1&q=UTF-16

How reproducible:
always

Steps to Reproduce:
1. connect to SQL Server using pyodbc / freetds, TDS Version 7.1
2. fetch some values
  
Actual results:
(u'\U00630045\U006e006f\U006c0065', )

Expected results:
(u'Econel', )

Additional info:
Solved in pyodbc-3.0.6-1.fc19.x86_64 (rawhide). That
s the version I produced the "Expected results" output with. The release notes indicate that an update to 2.1.8 would suffice to fix this issue.

Comment 1 Martin Wilck 2012-10-26 13:21:42 UTC
I notice that pyodbc 3.0.6 has been in rawhide for since August... When will it come to the main distro?

Comment 2 Honza Horak 2012-10-31 15:47:27 UTC
(In reply to comment #1)
> I notice that pyodbc 3.0.6 has been in rawhide for since August... When will
> it come to the main distro?

I'm not planning to do so, but I'm going to update to 2.1.11 in stable releases, because of fixes you described and others.

Comment 3 Fedora Update System 2012-10-31 16:14:24 UTC
pyodbc-2.1.11-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/pyodbc-2.1.11-1.fc18

Comment 4 Fedora Update System 2012-10-31 16:17:41 UTC
pyodbc-2.1.11-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/pyodbc-2.1.11-1.fc17

Comment 5 Fedora Update System 2012-10-31 16:18:23 UTC
pyodbc-2.1.11-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/pyodbc-2.1.11-1.fc16

Comment 6 Fedora Update System 2012-11-01 01:22:39 UTC
Package pyodbc-2.1.11-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pyodbc-2.1.11-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17395/pyodbc-2.1.11-1.fc16
then log in and leave karma (feedback).