Skip to content
Advertisement

special character “” is not work in Linux, converted into “?”

I consuming an api which is returning String with special characters, so I replace them with blank or some other user readable char.

My code:

JavaScript

The above code works fine for windows machine but in Linux “” converted into “?”, even other all special char converted into “?”. I am using Java, UTF-8 in my HTML. Please let me know any platform independent solution. Thanks

Advertisement

Answer

I am consuming the REST api, so while getting the output I have to maintain UTF-8 encoding.

JavaScript

I have added standardCharsets.UTF_8

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement