Maybe you can replace it with $chr(125) , this is the ascii value for }