I am facing a tiny issue (I believe) in socket programming. When sending text from non-English languages, I get garbled results. After a lot of researching on google, I made some corrections. I changed getBytes() to getBytes("UTF-8") and tried to send some Arabic text.
When connecting sockets locally, it works fine. I see the arabic text I expected. But when testing from online, the results display strange/garbled characters.
Here is the text I tried:
"مرحبا" (this is the arab text of "hello") which displayed to me as "Ù…Ø±ØØ¨Ø§"
Please help me in resolving this issue.