MXJ special charactor??


    Jan 31 2011 | 3:46 pm
    hello,
    I found one big problem when i use below code for URLEncoding.
    URLEncoder.encode(str, "UTF-8");
    with farther more checking some example,
    I found below mxj code working strange.
    public class testEncoder extends MaxObject {
    public testEncoder() {
    declareIO(1, 1);
    createInfoOutlet(false);
    }
    public void bang() {
    post("%3A");
    }
    }
    when i send bang to this mxj object, i found folloing letters in max window.
    -0X1.FE844199EA88P+0
    does anybody has an idea about this??
    thanks in advance.
    best

    • Mar 21 2011 | 11:26 am
      post() is doing sprintf-style interpretation of %-sequences. %A is a hexadecimal representation of a double-precision float. Since you don't pass a double in your call to post(), it uses whatever it finds on the stack.