encoding for conversion in word

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, Im trying to convert a html page in a word document I can do it using the following code :

<pre style="background:white; color:black; font-family:Consolas Response.Clear();
Response.Charset = <span style="color:#a31515 "";
Response.HeaderEncoding = <span style="color:#2b91af Encoding.UTF32;
Response.ContentType = <span style="color:#a31515 "application/ms-word";<pre style="background:white; color:black; font-family:Consolas <span style="color:blue string strFileName = <span style="color:#a31515 "test" + <span style="color:#a31515 ".doc";
Response.AddHeader(<span style="color:#a31515 "Content-Disposition", <span style="color:#a31515 "inline;filename=" + strFileName);[/code]
<pre style="background:white; color:black; font-family:Consolas <pre style="background:white; color:black; font-family:Consolas StringBuilder html = new StringBuilder() ; [/code]
<pre style="background:white; color:black; font-family:Consolas html.Append(<span style="color:#a31515 "<html> My complete html page</html>");
Response.Write(html.ToString());
Response.End();
Response.Flush();[/code]
[/code]
[/code]
This code works very well the problem is when I geneate the word file some character are not the same for example " " became
<span><span style="font-size:12pt <span style="font-family:Times New Roman lÃââ . I saw that changin
<span style="font-size:x-small <span style="color:#2b91af Encoding.UTF32 to
<span style="color:#2b91af Encoding.UTF8 some carachters were changed .. but I tried all values of the Encoding class ant it still doesnt work can someone help me ?
<span><span style="font-size:12pt <span style="font-family:Times New Roman; font-size:x-small Thank you.

<
Alex<br/>
<br/>

View the full article
 
Back
Top