C
Chris Leffer
Hi.
I am having problems to use HtmlEncode with strings that use accents. My
page uses some expressions like that:
<%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Name").Trim)
%>
If the 'Name' has no accents all works well. But if the 'Name ' has
accents they appear encoded, like Nã.
How can I solve this? I need to correctly display the accented
characters, but wants to use HtmlEncode to help me prevent problems with
malicious/erroneous data.
Regards,
Chris Leffer
I am having problems to use HtmlEncode with strings that use accents. My
page uses some expressions like that:
<%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Name").Trim)
%>
If the 'Name' has no accents all works well. But if the 'Name ' has
accents they appear encoded, like Nã.
How can I solve this? I need to correctly display the accented
characters, but wants to use HtmlEncode to help me prevent problems with
malicious/erroneous data.
Regards,
Chris Leffer