Character removal on Heroku server

0

I have the following code snippet for special character override

public String removerAcentos(String str) {
    return Normalizer.normalize(str.replaceAll(" ", ""), Normalizer.Form.NFD).replaceAll("[^\p{ASCII}]", "");
}

When I run on my machine (windows) it works perfectly for my purpose.

ex: Parametro = "SAGRADO CORAÇÃO" retorno = "SAGRADOCORACAO"

When I execute the method by request to the server, the following happens:

ex: Parametro = "SAGRADO CORAÇÃO" retorno = "SAGRADOCORAO"

Special characters are removed from the string

Can anyone tell me why, and some solution?

    
asked by anonymous 12.05.2017 / 16:14

0 answers