aspx display romanian diacritics

G

george.miscalencu

I'm trying to display a text from a database, text that contains
Romanian diacritics (aîst) in a aspx page. The text has been
inserted in the database using a asp application with a HTML editor
with this setting: content-type="text/html; charset=iso-8859-2"

I have failed to do this. I've tried using all the possible settings
that I know: setting content-type or charset in web.config ->
globalization, from IIS -> HTTP Headers, from @page
responseEncoding=".., from C# code, using Response.ContentType or
Response.AddHeader or <META> using only one setting at a time or even
combining 2-3 settings..

The only combination that did worked, it was: setting <globalization
responseEncoding="unicode"> and in the same time, in IIS-HTTP Headers:
content-type: ="text/html; charset=iso-8859-2".
The problem is, that in this case, although the text is displayed
correctly (with diacritics) when I try to view the Page Source the text
has a space between every character, and a new empty line between every
two lines. Another problem would be that I would like to change this
settings dynamically, to match my text encoding (I want to use the same
page for different languages) In this case, the setting from the IIS ->
HTTP Headers would not help.

I have even tried to create a empty aspx page with some text with
diacritics from my keyboard, not from the database, but I failed to
display them correctly also.

Can anyone help? Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top