Re: INI File Processing Improvements

2004-01-25 Thread Dmitry Timoshkov
"Robert Shearman" <[EMAIL PROTECTED]> wrote: > > > > Why not simply use IsTextUnicode/RtlIsTextUnicode and fix it > > if necessary? > > > > > > Ok, will do. Any idea if it can detect UTF8 as well? > > > > I don't see that it's documented in MSDN, but probably it's worth to test > > an actual be

Re: INI File Processing Improvements

2004-01-25 Thread Dmitry Timoshkov
"Robert Shearman" <[EMAIL PROTECTED]> wrote: > > > > 1. You are duplicating too much unicode helpers already existing in > > > > wine_unicode and include/wine/unicode.h > > > > > > There are no strnchrW and strnrchrW routines in unicode.h, so how do you > > > propose I rewrite memchrW and memrchrW

RE: INI File Processing Improvements

2004-01-25 Thread Robert Shearman
> > > "Robert Shearman" <[EMAIL PROTECTED]> wrote: > > > > Why not simply use IsTextUnicode/RtlIsTextUnicode and fix it > if necessary? > > > > Ok, will do. Any idea if it can detect UTF8 as well? > > I don't see that it's documented in MSDN, but probably it's worth to test > an actual behavi

RE: INI File Processing Improvements

2004-01-25 Thread Robert Shearman
> > > "Robert Shearman" <[EMAIL PROTECTED]> wrote: > > > > 1. You are duplicating too much unicode helpers already existing in > > > wine_unicode and include/wine/unicode.h > > > > There are no strnchrW and strnrchrW routines in unicode.h, so how do you > > propose I rewrite memchrW and memrchrW? >

Re: INI File Processing Improvements

2004-01-24 Thread Dmitry Timoshkov
"Robert Shearman" <[EMAIL PROTECTED]> wrote: > > 1. You are duplicating too much unicode helpers already existing in > > wine_unicode and include/wine/unicode.h > > There are no strnchrW and strnrchrW routines in unicode.h, so how do you > propose I rewrite memchrW and memrchrW? Perhaps just add

Re: INI File Processing Improvements

2004-01-24 Thread Dmitry Timoshkov
"Robert Shearman" <[EMAIL PROTECTED]> wrote: > > Why not simply use IsTextUnicode/RtlIsTextUnicode and fix it if necessary? > > Ok, will do. Any idea if it can detect UTF8 as well? I don't see that it's documented in MSDN, but probably it's worth to test an actual behaviour under Windows. -- D

RE: INI File Processing Improvements

2004-01-24 Thread Robert Shearman
> > > "Robert Shearman" <[EMAIL PROTECTED]> wrote: > > > - Add Unicode file detection > > > +static inline ENCODING PROFILE_DetectTextEncoding(const void * buffer) > > +{ > > +if (!memcmp(buffer, bom_utf8, > sizeof(bom_utf8)/sizeof(bom_utf8[0]))) > > +return ENCODING_UTF8; > > +if (

RE: INI File Processing Improvements

2004-01-24 Thread Robert Shearman
> > > "Robert Shearman" <[EMAIL PROTECTED]> wrote: > > > Changelog: > > - Use Win32 instead of Unix file functions > > - Process files fully in Unicode > > - Add Unicode file detection > > Further concerns: > > 1. You are duplicating too much unicode helpers already existing in > wine_unicode and i

Re: INI File Processing Improvements

2004-01-24 Thread Dmitry Timoshkov
"Robert Shearman" <[EMAIL PROTECTED]> wrote: > Changelog: > - Use Win32 instead of Unix file functions > - Process files fully in Unicode > - Add Unicode file detection Further concerns: 1. You are duplicating too much unicode helpers already existing in wine_unicode and include/wine/unicode.h 2

Re: INI File Processing Improvements

2004-01-24 Thread Dmitry Timoshkov
"Robert Shearman" <[EMAIL PROTECTED]> wrote: > - Add Unicode file detection > +static inline ENCODING PROFILE_DetectTextEncoding(const void * buffer) > +{ > +if (!memcmp(buffer, bom_utf8, sizeof(bom_utf8)/sizeof(bom_utf8[0]))) > +return ENCODING_UTF8; > +if (*(WCHAR*)buffer == BOM