Search This Blog

Java: Remove illegal character 0x0 from string

Unicode 0x0 is illegal in XML.
str.replaceAll("[\\000]+", "")

1 comment: