• Post Reply Bookmark Topic Watch Topic
  • New Topic

Character Encoding in Servlet  RSS feed

 
Lee Cage
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a interesting problem with servlets. Apparently first I want to ask if it is possible to use Turkish Characters in servlet files? (like ı,i,ğ,�ş,�,�) I used these characters in servet. When I compiled and run the file in netbeans, 'ğ' character doesn't show up in browser, instead, I see a question mark. I set my browsers encoding utf-8. After compiling, netbeans changes the 'ğ' characters to question marks in code. I don't know how to solve this problem. it would be great if someone help me. Here is the piece of code I used in servlet.

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to use the native2ascii tool as part of your build process. From its documentation:

The Java compiler and other Java tools can only process files which contain Latin-1 and/or Unicode-encoded (\udddd notation) characters. native2ascii converts files which contain other character encodings into files containing Latin-1 and/or Unicode-encoded charaters.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!