• Post Reply Bookmark Topic Watch Topic
  • New Topic

strange characters when invoking servlet

 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wrote this servlet:

my language is pt (portuguese Portugal), i've ie 6 and tomcat 5.5.17 with java5. when i open browser i can see, in viewsource:
Ol� Mundo!, smi again!

c�o
ma��
, but what broswer dispalys is a group of kind of chinese characters, along with a few white squares

is this an internationalization problem?
How can i correct this?
TiA
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
case solved:
i added this at first line:

i'm not sure if i really need the utf-8 part
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
text/html is surely not needed twice
 
aman hindustani
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello miguel i feel that what ever you have give in the out.println(); it is printing the same one ..just printing in the separte line as you have given \n character...
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for a moment i forgot about <br />
as to text/html its a typo
anyway thanks for remarking
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!