Skip to content

Fixes #185 #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fixes #185 #259

wants to merge 4 commits into from

Conversation

nagyv
Copy link

@nagyv nagyv commented Jul 30, 2014

This fix eliminates unnecessary encoding-unicode switching.


def test_unicode_characters_in_query():
res = substitute_params("testing ascii (ąčę) 1=%d 'one'=%s", (1, 'str'))
eq_(res, b"testing ascii (\xc4\x85\xc4\x8d\xc4\x99) 1=1 'one'=N'one'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test case proposed by the PR can't be successfull as currently written.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramiro Could you explain me, why it won't work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nagyv Because AFAICT there is no N'one literal and there is nowhere it can be extracted or interpolated from.

@ramiro
Copy link
Contributor

ramiro commented Aug 13, 2014

Running the full, test suite shows the change introduces four test failures elsewhere.

Also, a PEP 0263 encoding comment needs to be added to the modified test file.

@rsyring rsyring added this to the 2.1.2 milestone Oct 25, 2014
@msabramo
Copy link
Contributor

@nagyv: Do you want to take a shot at updating this and getting the tests to pass?

@nagyv
Copy link
Author

nagyv commented Sep 12, 2015

I would like to get the tests fixed, but can't run travis myself as I don't have any mssql servers to connect to. Could you share with me in a private message the value of "PYMSSQL_TEST_DATABASE" in tox.ini?

@ramiro
Copy link
Contributor

ramiro commented Jan 14, 2016

I believe this was fixed (using another strategy) by the merging of #361 / #367.

Could you please confirm this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants