I have a client application which is sending a request to a server. Server is fetching a field from a database and sending a java.lang.String
response back to the client. Server is running on JBoss v5.0. The unusual thing is that, when server is running on Windows machine, the response received by the client is normal but when it is running on Linux there is some problem in the encoding.
This is the data in the database: "INET§IMPNG\n"
Response is correctly received when server running on Windows.
A special character is appended before §
when the server is running on Linux. Is there any special thing i need to do at the server side. Any help would be appreciated.
EDIT:
The response received is : INET§IMPNG
.
A special character is one that is not considered a number or letter. Symbols, accent marks, and punctuation marks are considered special characters.
In film credits for stories, screenplays, etc., & indicates a closer collaboration than and. The ampersand is used by the Writers Guild of America to denote two writers collaborating on a specific script, rather than one writer rewriting another's work.
This is almost certainly a character encoding issue. To avoid mismatches between client and server, always specify a specific encoding and avoid the default encoding. (So, for instance, instead of "xyz".getBytes()
, use "xyz".getBytes("UTF-8")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With