• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need to get utf-8 strings in java servlet  RSS feed

 
venkat gopal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hai,

Im facing a problem when i try to get utf-8 string in java servlet.

I have a jsp page where i have set



Im trying to enter subject name in tamil and english (both langauges)

In my servlet i have coded




but when i try to print those values im able to print value of englishname
when trying to print tamil name im getting blablabla values

i need to store subject name in both language tamil and english into my database SQL server
i have declared the datatype as nvarchar(max) which stores unicode characters

can anybody help me to sort it out?

Thanks


 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're seeing garbled characters in console, it doesn't mean the parameter values are wrong - console has problems with displaying other languages since it can't find the glyphs. Log the values to web server log file or your own log file, open it with Notepad++ and select UTF-8 encoding. If you see non-English characters correctly, your app is working fine.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"gk ven", please check your private messages for an important administrative matter.
 
venkat gopal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hai,

When i print utf-8 values im facing a problem - the values of ¯Œ (BOM) symbol gets replaced by ? mark.
What is the reason for values getting replaced? What should be done to avoid such replacement?

Can anybody provide me a solution?


Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!