Click here to Skip to main content
15,917,059 members
Home / Discussions / C#
   

C#

 
QuestionReference to Word 2003 Pin
Larza12324-May-07 9:37
Larza12324-May-07 9:37 
AnswerRe: Reference to Word 2003 Pin
Dave Herren24-May-07 9:56
Dave Herren24-May-07 9:56 
AnswerRe: Reference to Word 2003 Pin
Muammar©24-May-07 23:48
Muammar©24-May-07 23:48 
QuestionUser control in DataGridView cell Pin
pserranop24-May-07 8:58
pserranop24-May-07 8:58 
QuestionHow to capture the final DocumentCompleted in Pin
Epsilone324-May-07 6:47
Epsilone324-May-07 6:47 
AnswerRe: How to capture the final DocumentCompleted in Pin
Epsilone324-May-07 8:08
Epsilone324-May-07 8:08 
QuestionListening to program events. Pin
Muntyness24-May-07 6:10
Muntyness24-May-07 6:10 
AnswerRe: Listening to program events. Pin
Dave Herren24-May-07 6:26
Dave Herren24-May-07 6:26 
GeneralRe: Listening to program events. Pin
Muntyness24-May-07 6:48
Muntyness24-May-07 6:48 
AnswerRe: Listening to program events. Pin
Dave Kreskowiak24-May-07 6:57
mveDave Kreskowiak24-May-07 6:57 
GeneralRe: Listening to program events. Pin
Muntyness24-May-07 7:26
Muntyness24-May-07 7:26 
Questionread from DAT file Pin
Mohammed Elkholy24-May-07 6:05
Mohammed Elkholy24-May-07 6:05 
AnswerRe: read from DAT file Pin
Tarakeshwar Reddy24-May-07 6:28
professionalTarakeshwar Reddy24-May-07 6:28 
AnswerRe: read from DAT file Pin
Dave Herren24-May-07 6:31
Dave Herren24-May-07 6:31 
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 

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.