From: Marcos P. <msa...@gr...> - 2003-02-25 15:10:19
|
I should have tried first; it seems to work just by initialising the locale import locale locale.setlocale(locale.LC_ALL, '') El mi=E9, 19-02-2003 a las 13:28, Marcos S=E1nchez Provencio escribi=F3: > Hi there. >=20 > =BFIs it possible to issue a query such as "select 'a=F1o' "? (in case it > does not show, between the a and the o there is a n with a ~ on top, a > very usual char in Spain/Espa=F1a). >=20 > It works from tsql (include with freetds):: >=20 > marcos@cynar:/usr/local/Webware/WebKit$ tsql -Scazalla -Usa > locale is "es_ES@euro" > charset is "ISO-8859-15" > Password:=20 > Msg 5703, Level 0, State 1, Server CAZALLA, Line 0 > Changed language setting to us_english. > 1> select 'a=F1o' > 2> go >=20 > a=F1o >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Using Python >=20 > SELECT 'a=F1o' from usuarios=20 > Traceback (most recent call last): > File "etcPythonSybase.py", line 227, in ? > rs=3Dcon.lookup(sql) > File "etcPythonSybase.py", line 203, in lookup > cur,con=3Dself.lookupRS(sql,params) > File "etcPythonSybase.py", line 122, in lookupRS > cur.execute(sql) > File "/usr/lib/python2.2/site-packages/Sybase.py", line 381, in > execute > self._start_results() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 547, in > _start_results > status, result =3D self._cmd.ct_results() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 145, in > _servermsg_cb > raise DatabaseError(_fmt_server(msg)) > Sybase.DatabaseError: Msg 105, Level 15, State 1, Line 1 > Unclosed quotation mark before the character string > 'a???????????????..?'.Msg 170, Level 15, State 1, Line 1 > Line 1: Incorrect syntax near 'a???????????????..?'. > =3D=3D=3D=3D >=20 > I appreciate any pointers. The client is linux, freetds, the server is > SQL2000. >=20 > --=20 > Marcos S=E1nchez Provencio <ra...@ar...> >=20 > _______________________________________________ > Python-sybase mailing list > Pyt...@ob... > https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |