You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by David Bertoni <db...@apache.org> on 2008/04/10 22:08:46 UTC

Re: passing a _Tchar type filename to parser-parse(filename) for sax parser

Barry, Gregory P. wrote:
> Hi,
> 
>  
> 
> How can I pass an xml filename as _Tchar to the sax parser? I keep 
> getting mismatch or exception errors. I tried converting _Tchar to char* 
> and to XMLCh* but no resolution. I am not that familiar with unicode or 
> _Tchar and am mostly a linux developer but am on a windows platform for 
> the ime being, however is there away to assign unicode settings to XMLCh.
The problem with _TCHAR is that its type depends on a preprocessor 
definition. If you're calling SAXParser::parse() or 
SAX2XMLReader::parse() then it should work for either multi-byte 
characters or for Unicode.

If you're getting type mismatch errors from the compiler for XMLCh and 
wchar_t, then you need to make sure the Visual C++ compiler is 
configured to treat wchar_t the same way that the Xerces-C project file 
is configured.  This had been a common question lately, so search the 
archives for wchar_t, or use the compiler error message as the basis for 
your search.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org