2

I have a sql statement: select 'ó' from dual; after running fetchall for this statement I get the following string.'\xc2\xbf' in python.

How do I get the original text based on the string returned? any ideas?

thanks!

Update: It turns out that the fetchall might be converting the 'ó' to an inverted questionmark(the \xc2\xbf). any ideas why that is. I'm using

#!/usr/bin/env python
# -*- coding: latin-1 -*-
??
1
  • if u want to see it,if that is meant by get,then print '\xc2\xbfn' Commented May 20, 2011 at 17:07

1 Answer 1

2

http://docs.python.org/library/stdtypes.html#str.decode is what you're looking for.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.