Double Encoding Spanish

  • Thread starter Thread starter Chris Welch
  • Start date Start date
C

Chris Welch

I'm having a problem with double encoding on my page which is localized
in both English and Spanish.

I try to set Image1.AlternateText = "BÚSCAR", and when the page
displays the alt attribute, it is double-encoded as
"BÚSCAR". So I try to run the string through
HttpUtility.HtmlDecode first, but AlternateText doesn't encode the
Acute-U. The alt attribute is "B`USCAR"

Is there a way to short-circuit AlternateText's incomplete encoding, so
it will actually display the character entity properly? Do I not need
to worry about the character encoding for spanish characters since the
page is in UTF-8?
 
Chris said:
I'm having a problem with double encoding on my page which is
localized in both English and Spanish.

I try to set Image1.AlternateText = "BÚSCAR", and when the page
displays the alt attribute, it is double-encoded as
"BÚSCAR". So I try to run the string through
HttpUtility.HtmlDecode first, but AlternateText doesn't encode the
Acute-U. The alt attribute is "B`USCAR"

Is there a way to short-circuit AlternateText's incomplete encoding,
so it will actually display the character entity properly? Do I not
need to worry about the character encoding for spanish characters
since the page is in UTF-8?

If you're using UTF-8 (as file encoding), you can use native characters
in your APSX files without problems.

Cheers,
 
Back
Top