Dear Oleg,
i made the small modification, now it is checking only StringCol
and replaces to UnicodeCol
but then i receive this error when i use get() this table
contains a TEXT field:
Traceback (most recent call last):
File "D:\alco\python\admin\timeshit.py", line 44, in ?
sa = ts_task.get(34)
File "c:\python24\lib\site-packages\sqlobject-trunk\sqlobject\main.py", line
917, in get
val._init(id, connection, selectResults)
File "c:\python24\lib\site-packages\sqlobject-trunk\sqlobject\main.py", line
959, in _init
self._SO_selectInit(selectResults)
File "c:\python24\lib\site-packages\sqlobject-trunk\sqlobject\main.py", line
1158, in _SO_selectInit
colValue = col.to_python(colValue, self._SO_validatorState)
File
"c:\python24\lib\site-packages\FormEncode-0.4-py2.4.egg\formencode\compound.py",
line 57, in to_python
to_python)
File
"c:\python24\lib\site-packages\FormEncode-0.4-py2.4.egg\formencode\compound.py",
line 111, in attempt_convert
value = validate(validator, value, state)
File
"c:\python24\lib\site-packages\FormEncode-0.4-py2.4.egg\formencode\compound.py",
line 15, in to_python
return validator.to_python(value, state)
File "c:\python24\lib\site-packages\sqlobject-trunk\sqlobject\col.py", line
516, in to_python
return value.encode("ascii")
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position
37: ordinal not in range(128)
that's why i include BlobCol as well.
what do you think?
Wednesday, June 14, 2006, 4:40:21 PM, you wrote:
OB> On Wed, Jun 14, 2006 at 04:23:58PM +0200, Ivan Horvath wrote:
>> yes, but i didn't find anything in postgresconnection which
>> handle unicode blob fields.
OB> Postgres has BYTEA - special byte array type for BLOBs; no need to guess
OB> if it is TEXT or BLOB.
>> i thought also that this cannot handle binary data.
>> should be created another column BlobUnicodeCol, or what is your
>> idea?
OB> I think unicode can be decoded in BLOBValidator.
OB> Oleg.
--
Best regards,
Ivan Horvath
Chief Programmer
Alcatel ISD
PMS 2000 Product Team
H-1116, Budapest
Kondorfa u. 10.
Tel.: +36 1 209 9546
Fax.: +36 1 209 9599
Mobil: +36 30 257 0235
VOIP: +49 511 676 478010
mailto:[EMAIL PROTECTED]
Anyone who has never made a mistake has never tried anything new.
/Albert Einstein/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss