Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Java SpringFramework HTTPRequest unicode character problem

Current License: CC BY-SA 4.0

4 events
when toggle format what by license comment
Jan 3, 2023 at 17:23 comment added hooknc So, I am not totally sure what your question/goal is... Are you trying to convert the square question mark into the correct characters? Do you want to reject any xml that isn't utf-8? Do you want to accept any character set and then change it into utf-8 as part of the response? My guess is that you want to convert the characters, but that can sometimes be difficult. First and foremost, I would urge you to figure out the code points of the characters that are messed up, then determine what those values should actually be. stackoverflow.com/q/23979676/42962
Jan 2, 2023 at 14:31 comment added Malignus the characters that get changed into � are the classic àòèéìù, "", «» and SOMETIMES '. The problem comes from the fact that the retVal is an array of bytes that already gets populated with the wrong character.
Dec 28, 2022 at 16:47 comment added hooknc Welcome to the world of character sets. They are terribly difficult to get right. Hopefully the server tells you what character set it is using and then you use that character set to read your xml. However, not all character sets play nicely with the expected character ranges. One that is notorious for doing this is the microsoft character set that used control characters, which caused all sorts of problems. I would recommend looking for those control characters in your returned xml and replace them with a suitable replacement. alanwood.net/demos/ansi.html
Dec 28, 2022 at 15:34 history asked Malignus CC BY-SA 4.0

AltStyle によって変換されたページ (->オリジナル) /