Looks like processing on windows works with win-1251 codepage

Here is my sketch. I'm not very experienced in Java, so it can be ugly =)
Code: Select all
import netP5.*;
import oscP5.*;
import java.nio.charset.*;
class OscMessageUTF extends OscMessage
{
public OscMessageUTF( final String theAddrPattern ) {
super( theAddrPattern , new Object[ 0 ] );
}
public OscMessage addUTF( final String theValue ) {
_myTypetag = Bytes.append( _myTypetag , new byte[] { 0x73 } );
//string must be in UTF-8
final byte[] myString = theValue.getBytes(Charset.forName("UTF-8"));
_myData = Bytes.append( _myData , myString , new byte[ align( myString.length ) ] );
_myArguments = increase( 1 );
_myArguments[ _myArguments.length - 1 ] = theValue;
return this;
}
}
OscP5 osc = new OscP5( this , 12000); //<>//
NetAddress remote = new NetAddress("127.0.0.1", 7000);
OscMessageUTF message = new OscMessageUTF("/composition/layers/67/clips/1/video/source/blocktextgenerator/text/params/lines");
message.addUTF("hüpfen");
osc.send(message, remote);
Code: Select all
theValue.getBytes(Charset.forName("UTF-8"));