<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1498" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>Good 
morning&nbsp;Folks,</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>I've looked around 
on Google for this a few times and really haven't come up with anything 
definitive.</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>I'm trying to update 
values in Oracle with the .execute() method from cx_Oracle.</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>If I create a Python 
unicode string object and try to pass it in, Python complains that .execute() 
expects a None or string.</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>If I convert the 
unicode string to a regular "byte" string beforehand with .encode() and utf-8, 
Python accepts it but when we pull the data back from Oracle we get garbage 
characters.</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>Some 
details:</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>Python 2.4 with a 
recent version of cx_Oracle (don't have the exact version here)&nbsp; Running on 
Solaris.</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>And from our 
DBA:<BR></FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>Oracle 9 on 
Solaris.&nbsp; </FONT></SPAN><SPAN class=551064912-05052005><FONT face=Arial 
size=2>The database was told to support Unicode.</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>The character fields 
are currently VARCHAR2; he believes he's seen conflicting evidence online about 
whether or not that is supposed to work.&nbsp; </FONT></SPAN><SPAN 
class=551064912-05052005><FONT face=Arial size=2>We've also talked about using 
NVARCHAR2 and NCLOB.</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>We have not set any 
environment variables on Solaris.</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial size=2>Thanks in 
advance,</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2>Mark</FONT></SPAN></DIV>
<DIV><SPAN class=551064912-05052005><FONT face=Arial 
size=2>&nbsp;</DIV></FONT></SPAN></BODY></HTML>