Re: get_innerHTML on body returns ? characters for UNICODE text



hi craig,
i am also faced with same problem
i am able to solve it with the following code
/// <summary>
/// This method replaces all the characters whose numerical value is
greater than 127 with unicode string
/// </summary>
/// <param name="html">string in which unicode characters has to be
replaced</param>
/// <returns></returns>
private string ProcessUnicode(string html)
{
//Loop through all the characters in the string
foreach(char ch in html)
{
if((int)ch > 127) //numerical value is greater than 127 insert the
unicode string for this
html = html.Replace(ch.ToString(),"&#"+((int)ch).ToString()+";");
}
return html;
}
if you call this method before sving the content with the html wich you
are going to save i hope it will solve your problem
best of luck bye

.



Relevant Pages

  • Re: IoCreateSymbolicLink
    ... My fault - I copied a UNICODE string used for IoCreateSymbolicLink() and ... forgot to initialize the Length parameter. ... Prev by Date: ...
    (microsoft.public.development.device.drivers)
  • Convert Unicode string to EBCDIC
    ... Could someone pls tell me how to convert a Unicode string to EBCDIC ... Is WideCharToMultiByte API is the only way? ... Prev by Date: ...
    (microsoft.public.dotnet.framework)
  • How do i convert unicode string to ansi string in C#?
    ... I need to convert unicode string to ansi string ... Thanks in adavance. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)