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

C#

 
QuestionWebbrowser Control--- Text To HTML Pin
chettu24-May-07 4:22
chettu24-May-07 4:22 
AnswerRe: Webbrowser Control--- Text To HTML Pin
Dave Herren24-May-07 4:37
Dave Herren24-May-07 4:37 
GeneralRe: Webbrowser Control--- Text To HTML Pin
chettu24-May-07 6:16
chettu24-May-07 6:16 
QuestionBinary or Non-Binary File Pin
DotNetDominator24-May-07 3:27
DotNetDominator24-May-07 3:27 
AnswerRe: Binary or Non-Binary File Pin
Judah Gabriel Himango24-May-07 5:33
sponsorJudah Gabriel Himango24-May-07 5:33 
AnswerRe: Binary or Non-Binary File Pin
Luc Pattyn24-May-07 6:10
sitebuilderLuc Pattyn24-May-07 6:10 
GeneralRe: Binary or Non-Binary File Pin
DotNetDominator24-May-07 9:33
DotNetDominator24-May-07 9:33 
GeneralRe: Binary or Non-Binary File Pin
Luc Pattyn24-May-07 9:59
sitebuilderLuc Pattyn24-May-07 9:59 
Hi,

if a text file is encoded using ASCII or ANSI or some other 8-bit character set,
then zero-testing looks acceptable.

if a text file is encoded using some 16-bit encoding scheme, then zero bytes
can occur in text files (e.g. the char 0x0100, 0x0200, etc).
You could check the first few bytes of the file, Unicode/UTF8/UTF16 use special
values here; if these match you might assume it is text and skip further
testing (and once in a while such assumption will be wrong);
if they dont match you could assume it is an 8-bit encoding, and do the zero test.

Whatever you do, since 100% confidence will not be achievable, I see no point
in checking more than a few hundred bytes before deciding text/no text.

Smile | :)


QuestionI am getting PDF error Pin
adilkazmi24-May-07 3:08
adilkazmi24-May-07 3:08 
AnswerRe: I am getting PDF error Pin
Colin Angus Mackay24-May-07 4:47
Colin Angus Mackay24-May-07 4:47 
JokeRe: I am getting PDF error Pin
Martin#24-May-07 5:17
Martin#24-May-07 5:17 
QuestionHow do I create a dock able toolbar in C# like the office toolbar Pin
Sagar Pattnayak24-May-07 3:06
Sagar Pattnayak24-May-07 3:06 
AnswerRe: How do I create a dock able toolbar in C# like the office toolbar Pin
Martin#24-May-07 3:15
Martin#24-May-07 3:15 
QuestionContext Menu Click Pin
deep_C#24-May-07 2:21
deep_C#24-May-07 2:21 
AnswerRe: Context Menu Click Pin
Giorgi Dalakishvili24-May-07 2:26
mentorGiorgi Dalakishvili24-May-07 2:26 
QuestionRe: Context Menu Click Pin
deep_C#24-May-07 2:35
deep_C#24-May-07 2:35 
AnswerRe: Context Menu Click Pin
Giorgi Dalakishvili24-May-07 2:38
mentorGiorgi Dalakishvili24-May-07 2:38 
GeneralRe: Context Menu Click Pin
deep_C#24-May-07 2:58
deep_C#24-May-07 2:58 
AnswerRe: Context Menu Click Pin
Martin#24-May-07 2:39
Martin#24-May-07 2:39 
GeneralRe: Context Menu Click Pin
deep_C#24-May-07 2:58
deep_C#24-May-07 2:58 
GeneralRe: Context Menu Click Pin
Martin#24-May-07 3:21
Martin#24-May-07 3:21 
Questionwhich class is it calling? Pin
jon-8024-May-07 1:31
professionaljon-8024-May-07 1:31 
AnswerRe: which class is it calling? Pin
CPallini24-May-07 1:41
mveCPallini24-May-07 1:41 
GeneralRe: which class is it calling? Pin
jon-8024-May-07 2:59
professionaljon-8024-May-07 2:59 
GeneralRe: which class is it calling? Pin
CPallini24-May-07 3:10
mveCPallini24-May-07 3:10 

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.