On Sep 15, 9:45 am, Squid wrote:
> It's time for another round of "stump-the-geek". (thats what we call
> it in my office)
>
> If actual code is needed I can provide but lets start off small for
> this one...
>
> I've got a Python script that uses cx_Oracle to access an Oracle DB.
> running the sc
It's time for another round of "stump-the-geek". (thats what we call
it in my office)
If actual code is needed I can provide but lets start off small for
this one...
I've got a Python script that uses cx_Oracle to access an Oracle DB.
running the script from command line runs perfect
running the
Richard Schulman wrote:
> On 10 Sep 2006 15:27:17 -0700, "John Machin" <[EMAIL PROTECTED]>
> wrote:
>
> >...
> >Encode each Unicode text field in UTF-8. Write the file as a CSV file
> >using Python's csv module. Read the CSV file using the same module.
> >Decode the text fields from UTF-8.
> >
> >Y
On 10 Sep 2006 15:27:17 -0700, "John Machin" <[EMAIL PROTECTED]>
wrote:
>...
>Encode each Unicode text field in UTF-8. Write the file as a CSV file
>using Python's csv module. Read the CSV file using the same module.
>Decode the text fields from UTF-8.
>
>You need to parse the incoming line into c
Richard Schulman wrote:
> On Sun, 10 Sep 2006 11:42:26 +0200, "Diez B. Roggisch"
> <[EMAIL PROTECTED]> wrote:
>
> >What does print repr(mean) give you?
>
> That is a useful suggestion.
>
> For context, I reproduce the source code:
>
> in_file = codecs.open("c:\\pythonapps\\mean.my",encoding="utf_16
> Value of the variable 'id' is u'\ufeff'
> Value of the variable 'mean' is u'('
So they both are unicode objects - as I presumed.
> It's very hard to figure out what to do on the basis of complexities
> on the order of
>
> http://download-east.oracle.com/docs/cd/B25329_01/doc/appdev.102/b251
On Sun, 10 Sep 2006 11:42:26 +0200, "Diez B. Roggisch"
<[EMAIL PROTECTED]> wrote:
>What does print repr(mean) give you?
That is a useful suggestion.
For context, I reproduce the source code:
in_file = codecs.open("c:\\pythonapps\\mean.my",encoding="utf_16_LE")
connection = cx_Oracle.connect("us
Richard Schulman schrieb:
>>> cursor.execute("""INSERT INTO mean (mean_id,mean_eng_txt)
>>> VALUES (:id,:mean)""",id=id,mean=mean)
>>> ...
>>> "cx_Oracle.NotSupportedError: Variable_TypeByValue(): unhandled data
>>> type unicode"
>>>
>>> But when I try putting a codecs.BOM_UTF16_LE in variou
>> cursor.execute("""INSERT INTO mean (mean_id,mean_eng_txt)
>> VALUES (:id,:mean)""",id=id,mean=mean)
>>...
>> "cx_Oracle.NotSupportedError: Variable_TypeByValue(): unhandled data
>> type unicode"
>>
>> But when I try putting a codecs.BOM_UTF16_LE in various plausible
>> places, I just end
Richard Schulman schrieb:
> Sorry to be back at the goodly well so soon, but...
>
> ...when I execute the following -- variable mean_eng_txt being
> utf-16LE and its datatype nvarchar2(79) in Oracle:
>
> cursor.execute("""INSERT INTO mean (mean_id,mean_eng_txt)
> VALUES (:id,:mean)""",id=id
Sorry to be back at the goodly well so soon, but...
...when I execute the following -- variable mean_eng_txt being
utf-16LE and its datatype nvarchar2(79) in Oracle:
cursor.execute("""INSERT INTO mean (mean_id,mean_eng_txt)
VALUES (:id,:mean)""",id=id,mean=mean)
I not surprisingly get this
11 matches
Mail list logo