Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
AnswerRe: merging two word file Pin
Pete O'Hanlon5-Oct-10 23:09
mvePete O'Hanlon5-Oct-10 23:09 
QuestionDatatable.BeginInit and EndInit Pin
abcurl5-Oct-10 18:17
abcurl5-Oct-10 18:17 
AnswerRe: Datatable.BeginInit and EndInit Pin
rah_sin5-Oct-10 19:40
professionalrah_sin5-Oct-10 19:40 
QuestionUnable to write Arabic text to a text file using C# [modified] Pin
Meneedhelp5-Oct-10 10:59
Meneedhelp5-Oct-10 10:59 
AnswerRe: Unable to write Arabic text to a text file using C# Pin
Luc Pattyn5-Oct-10 11:08
sitebuilderLuc Pattyn5-Oct-10 11:08 
GeneralRe: Unable to write Arabic text to a text file using C# Pin
Meneedhelp5-Oct-10 11:16
Meneedhelp5-Oct-10 11:16 
GeneralRe: Unable to write Arabic text to a text file using C# Pin
Meneedhelp5-Oct-10 11:57
Meneedhelp5-Oct-10 11:57 
GeneralRe: Unable to write Arabic text to a text file using C# Pin
Luc Pattyn5-Oct-10 13:06
sitebuilderLuc Pattyn5-Oct-10 13:06 
I'm not sure what you are attempting with CookiedWebClient and HTMLDocumentClass. I would suggest you try replacing
data = wc.DownloadData("http://www.alarabonline.org");
ms = new mshtml.HTMLDocumentClass();
strHTML = curEncoding.GetString(data);
objMyDoc = (mshtml.IHTMLDocument2)ms;
objMyDoc.write(strHTML);
innerText = objMyDoc.body.innerText;
tw.Write(innerText);

by
data = wc.DownloadData("http://www.alarabonline.org");
strHTML = curEncoding.GetString(data);
tw.Write(strHTML);

to see how that works out. I expect it will handle Arabic text well.

I am puzzled by you casting an HTMLDocumentClass to IHTMLDocument2; and by the compiler accepting your objMyDoc.write(strHTML) statement, as write expects an array of BSTR, not a string.

I would suggest you try and solve your functional requirement based on System.Windows.Form.HtmlDocument

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


AnswerRe: Unable to write Arabic text to a text file using C# Pin
jschell5-Oct-10 12:21
jschell5-Oct-10 12:21 
GeneralRe: Unable to write Arabic text to a text file using C# Pin
Meneedhelp5-Oct-10 12:26
Meneedhelp5-Oct-10 12:26 
Questionc# and javascript [modified] Pin
loyal ginger5-Oct-10 8:47
loyal ginger5-Oct-10 8:47 
QuestionExcel interop Borders [Solved] - see last comment Pin
Blubbo5-Oct-10 8:03
Blubbo5-Oct-10 8:03 
AnswerRe: Excel interop Borders Pin
Abhinav S5-Oct-10 8:14
Abhinav S5-Oct-10 8:14 
GeneralRe: Excel interop Borders Pin
Blubbo5-Oct-10 8:21
Blubbo5-Oct-10 8:21 
GeneralRe: Excel interop Borders Pin
Blubbo5-Oct-10 8:37
Blubbo5-Oct-10 8:37 
GeneralRe: Excel interop Borders Pin
Abhinav S5-Oct-10 18:16
Abhinav S5-Oct-10 18:16 
Questionnavigate to the code line in a .cs file Pin
prasadbuddhika5-Oct-10 5:49
prasadbuddhika5-Oct-10 5:49 
AnswerRe: navigate to the code line in a .cs file Pin
Not Active5-Oct-10 6:52
mentorNot Active5-Oct-10 6:52 
GeneralRe: navigate to the code line in a .cs file Pin
prasadbuddhika5-Oct-10 7:02
prasadbuddhika5-Oct-10 7:02 
GeneralRe: navigate to the code line in a .cs file Pin
Not Active5-Oct-10 8:26
mentorNot Active5-Oct-10 8:26 
GeneralRe: navigate to the code line in a .cs file Pin
prasadbuddhika5-Oct-10 9:04
prasadbuddhika5-Oct-10 9:04 
AnswerRe: navigate to the code line in a .cs file [modified] Pin
Luc Pattyn5-Oct-10 6:59
sitebuilderLuc Pattyn5-Oct-10 6:59 
AnswerRe: navigate to the code line in a .cs file Pin
prasadbuddhika5-Oct-10 22:08
prasadbuddhika5-Oct-10 22:08 
GeneralRe: navigate to the code line in a .cs file Pin
Pete O'Hanlon5-Oct-10 23:00
mvePete O'Hanlon5-Oct-10 23:00 
AnswerRe: navigate to the code line in a .cs file Pin
PIEBALDconsult7-Oct-10 15:05
mvePIEBALDconsult7-Oct-10 15:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.