Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

character entities

 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a form where user writes text (in portuguese), then it is submited and finally displayed.
what happens is that if i write:
ma��s, vulc�es
what i get is:
ma����s, vulc��es
how can i solve this?
note: in my jsp i have:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and tried also strict too
i use mysql 4.1

TiA
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i also tried several classes i googled for but they wont work properly:
i input ma��s and in database i get:maà ;§ ;à ;£s

edited: i added a space so it can be read as it is
[ November 26, 2006: Message edited by: miguel lisboa ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you setting the character set of the page? The Doc Type should not matter.

Eric
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i made a significant improvement: i striped my jsp from every line of javascript/ajax... and i get nice, good, perfect inserts and outputs!
so my question now is: how to tell javascript to let me have back my nice inserts/outputs?
i can post my ajax/javascript, if needed
can someone give me any hint, please?

TiA
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
case solved!

it was indeed a javascript problem: the moment i used espace() function all turned to normal:


thanks to all who tried to help me

BTW: the link on top of this page about displaying shows a page not found...
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic