Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / General ASP Topics / July 2009



Tip: Looking for answers? Try searching our database.

Accents

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paulo - 24 Jul 2009 15:56 GMT
What is the command to replace the accents for the browser recognizing them?

Because on "Response.Write(rs("FieldName"))" comes from the DB a word with
accent like: "Vitória"

But the browser shows a strange character on this word " ó "

But if I go to the source code page it shows ok...
Martin Honnen - 24 Jul 2009 16:24 GMT
> What is the command to replace the accents for the browser recognizing them?
>
> Because on "Response.Write(rs("FieldName"))" comes from the DB a word with
> accent like: "Vitória"
>
> But the browser shows a strange character on this word " ó "

You need to tell the browser the encoding used for your response. You
can do that by setting
  Response.Charset = "ISO-8859-1"
where ISO-8859-1 is just an example, replace that with the encoding you use.

Signature

    Martin Honnen --- MVP XML
    http://msmvps.com/blogs/martin_honnen/

Daniel Crichton - 27 Jul 2009 11:13 GMT
Paulo wrote  on Fri, 24 Jul 2009 11:56:38 -0300:

> What is the command to replace the accents for the browser recognizing
> them?

> Because on "Response.Write(rs("FieldName"))" comes from the DB a word
> with  accent like: "Vitória"

> But the browser shows a strange character on this word " ó "

> But if I go to the source code page it shows ok...

As well as Martin's suggestion, you can do this:

Response.Write Server.HTMLEncode(rs("FieldName"))

which will replace all the extended characters with their HTML encoded
versions.

Signature

Dan

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.