In Java, I want to print a label with a String as the input:
String command
= "N\n"
+ "A50,5,0,1,2,2,N,\"" + name + "\"\
+ "P1\n";
But when the input (name
) has a double quote character ("
), it is blank and prints nothing. I have tried using the replace function:
name.replace('"', '\u0022');
but it doesn't work. I want that double quote printed in label, how can I do this?