Hi List !
I make a patch how receive text from a python script by OSC (python read a DB with MySQLdb). Pd receive text from python but when i put special chars (é^ ... etc), it says to me: "Type tag said this arg is a string but it's not!" PD accept UNICODE, ASCII, ... UTF-8 ?
I have no ideas where they come from...
thanks very for your help and your council !
tranquillement,
Ths.
ps: with object [SHELL], no problemo !!! but i can use it .... i put my patch ... but it's very simple but why not ? ;-)
/// my english is soooo good; i know ! .... but i'm french ;-)
ths wrote:
Hi List !
I make a patch how receive text from a python script by OSC (python read a DB with MySQLdb). Pd receive text from python but when i put special chars (é^ ... etc), it says to me: "Type tag said this arg is a string but it's not!" PD accept UNICODE, ASCII, ... UTF-8 ?
how do you receive data on the pd side? via OSC? which library? OSCx or mrpeach's net/osc stuff?
fgmadsr IOhannes
Maybe with Python you have something like 'utf8_decode()' (this is
PHP). And then you need to save your Python document with UTF8 encoding.
Then you get all specials caracters like you want.
++
Jack
Le 8 mai 08 à 21:32, ths a écrit :
Hi List !
I make a patch how receive text from a python script by OSC (python
read a DB with MySQLdb). Pd receive text from python but when i put
special chars (é^ ... etc), it says to me: "Type tag said this arg
is a string but it's not!" PD accept UNICODE, ASCII, ... UTF-8 ?I have no ideas where they come from...
thanks very for your help and your council !
tranquillement,
Ths.
ps: with object [SHELL], no problemo !!! but i can use it .... i
put my patch ... but it's very simple but why not ? ;-)/// my english is soooo good; i know ! .... but i'm french ;-) <v3_PyOSC.pd>_______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
I had that problem long time ago. I think it affects characters that are utf16(?). first python had problems, but then passing the characters from python to pd gave me more problems... I could not solve it. marius.
Jack wrote:
Maybe with Python you have something like 'utf8_decode()' (this is
PHP). And then you need to save your Python document with UTF8 encoding. Then you get all specials caracters like you want. ++Jack
Le 8 mai 08 à 21:32, ths a écrit :
Hi List !
I make a patch how receive text from a python script by OSC (python
read a DB with MySQLdb). Pd receive text from python but when i put
special chars (é^ ... etc), it says to me: "Type tag said this arg
is a string but it's not!" PD accept UNICODE, ASCII, ... UTF-8 ?I have no ideas where they come from...
thanks very for your help and your council !
tranquillement,
Ths.
ps: with object [SHELL], no problemo !!! but i can use it .... i
put my patch ... but it's very simple but why not ? ;-)/// my english is soooo good; i know ! .... but i'm french ;-) <v3_PyOSC.pd>_______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Finally, we encode texts in ASCII before send them in PD and just use prepend string before [text2D/2D] and it accept ASCII
thanks you all !
(We put an exemple of SQL->python->OSC->PD->text2D when it's ok )
tranquillement, ths,
Jack a écrit :
Maybe with Python you have something like 'utf8_decode()' (this is PHP). And then you need to save your Python document with UTF8 encoding. Then you get all specials caracters like you want. ++
Jack
Le 8 mai 08 à 21:32, ths a écrit :
Hi List !
I make a patch how receive text from a python script by OSC (python read a DB with MySQLdb). Pd receive text from python but when i put special chars (é^ ... etc), it says to me: "Type tag said this arg is a string but it's not!" PD accept UNICODE, ASCII, ... UTF-8 ?
I have no ideas where they come from...
thanks very for your help and your council !
tranquillement,
Ths.
ps: with object [SHELL], no problemo !!! but i can use it .... i put my patch ... but it's very simple but why not ? ;-)
/// my english is soooo good; i know ! .... but i'm french ;-)<v3_PyOSC.pd>_______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list