receiving a string from processing over network via upd and into oscdecoder.
the strings containing umlauts(ä,ö,ü,…) are encoded wrong and don’t show up. strings without umlauts are o.k. how do i have to encode with asstring and asraw to make the oscdecoder work? example is attached.
kind regards A
hi joreg, even directly connected osc decoder does not display strings with umlauts. the output is always empty. because of that i tried to use the raw nodes in between (see the attached patch).
what if the umlauts in the string coming from processing via osc are broken? it is possible they are replaced by question marks. could that be the problem?
o.k. i am sending the string from processing with iso 8859-1 encoding (strangely utf-8 does not work). so i encode the raw string in vvvv via the raw node with iso-8859-1 again(now i have the string with all the #etc… where the umlauts appear as quads/squares), then back to raw (encode system default) and into the oscdecoder node. voila, the text appears correct, only the umlauts show up as question marks.
the OSCDecoder will decode the byte sequence with an ascii encoding as defined by osc. you’ll therefor need to make sure that you do not send something different over the network than plain ascii. to achieve that you’ll need to encode the processing string to a byte sequence using an encoding of your choosing (utf-8 for example), feed that byte sequence to a base64 encoder which will return a string containing ascii characters only. send that one over the network.
on vvvv side, do as joreg said in his first post and connect the udp node directly to the osc decoder node. the osc decoder node should now return the base64 encoded strings. use the Decode (Raw Base64) node to turn that base64 encoded string into the original byte sequence and feed that to the AsString (Raw) node using the encoding you chose on the processing side (utf-8 in this example).
that should do the trick.
sounds good. now i use the base64 encoder on the processing side. thats fine. on the vvvv side i can’t use the Decode (Raw Base64) node cause i am on winxp with beta29.2 which does not include Decode (Raw…).
i installed vvvv_45beta30_x86 but it won’t start. crack exe says o.k. but vvvv freezes during the start process. hm…
i guess it works only with 64bit version on win7? can you confirm that or is there a way to use 64bit on win xp?
it looks like that at vvvv side everything works ok. Processing sends umlauts just as umlauts, it doesn’t care that OSC understands only ASCII.
So maybe the solution in Processing is to get the bytes of the string (encoded as UTF-8) and then build the string from these bytes. Sounds longer than it is.
Here is the processing-sketch (v.1.5.1) and vvvv-patch (45beta30.2).