[chuck-users] OscOut string encoding

Stuart McDonald stuartcmcd at gmail.com
Tue Apr 18 06:38:52 EDT 2017


I have a Heath Robinson/Rube Goldberg contraption which has a ChucK
program sending an OSC message to a nodejs app which is broadcasting
data to a web browser client via web sockets. My problem is that by
the time the OSC messages get to nodejs the string "Höckerschwäne" is
converted into "HC6ckerschwC$ne". ChucK itself can print non-ascii
characters ok so I'm guessing the problem is with OSC itself.

The OSC 1.0 spec (http://opensoundcontrol.org/spec-1_0, link to 1.1
spec is dead) suggests ASCII only is supported for strings, although
punycode is mentioned on other OSC pages (I tried punycode decoding
the strings and they display gibberish). I'm wondering if the
artefacts are just 16 bit characters being naively encoded as two
separate ascii characters, or something similar.

Anyway, I'm asking here in the (perhaps unlikely) event anyone else
had been down this road before. I'm getting around the problem by
doing some string replacing at the nodejs end: not ideal, but there's
I've only got 3 non-ASCII characters in the mix so good enough for
now.

Cheers


Stuart


More information about the chuck-users mailing list