From ben at moreassociates.com Sun Jun 4 17:14:39 2006
From: ben at moreassociates.com (Ben Pirt)
Date: Sun, 4 Jun 2006 16:14:39 +0100
Subject: [Expat-discuss] parsing a stream of XML over a socket
Message-ID: <8751203C-1823-46CC-8B25-F05A81D180E4@moreassociates.com>
Hi All,
I have just started trying to work with expat so that I can send out
a stream of XML data over a socket so that a client can display the
results. I have already written the server in java and am currently
coding up a client in C which is where expat comes in. The problem I
am having is that C reads the socket in chunks at a time and so when
I pass a chunk to expat it will often throw an error. What is the
best approach for this problem? Is there a way to tell expat to keep
parsing a stream of XML? Is expat even the right parser to use?
Any help is greatly appreciated.
Thanks,
Ben Pirt
From benski at nullsoft.com Sun Jun 4 18:34:50 2006
From: benski at nullsoft.com (Ben Allison)
Date: Sun, 4 Jun 2006 12:34:50 -0400 (EDT)
Subject: [Expat-discuss] parsing a stream of XML over a socket
In-Reply-To: <8751203C-1823-46CC-8B25-F05A81D180E4@moreassociates.com>
References: <8751203C-1823-46CC-8B25-F05A81D180E4@moreassociates.com>
Message-ID: <1439.69.175.162.49.1149438890.squirrel@mail.winamp.com>
Parsing a stream chunks at a time works perfectly fine. Just make sure
you never pass a zero-sized chunk of data, as this indicates and
end-of-file to Expat.
Also, are you sure that your XML is valid?
-Ben Allison
> Hi All,
> I have just started trying to work with expat so that I can send out
> a stream of XML data over a socket so that a client can display the
> results. I have already written the server in java and am currently
> coding up a client in C which is where expat comes in. The problem I
> am having is that C reads the socket in chunks at a time and so when
> I pass a chunk to expat it will often throw an error. What is the
> best approach for this problem? Is there a way to tell expat to keep
> parsing a stream of XML? Is expat even the right parser to use?
> Any help is greatly appreciated.
> Thanks,
> Ben Pirt
From rolf at pointsman.de Sun Jun 4 19:47:18 2006
From: rolf at pointsman.de (rolf at pointsman.de)
Date: Sun, 4 Jun 2006 19:47:18 +0200 (CEST)
Subject: [Expat-discuss] parsing a stream of XML over a socket
In-Reply-To: <1439.69.175.162.49.1149438890.squirrel@mail.winamp.com>
Message-ID: <20060604174721.29B3856C6C@pointsman.pointsman.de>
On 4 Jun, Ben Allison wrote:
> Parsing a stream chunks at a time works perfectly fine. Just make sure
> you never pass a zero-sized chunk of data, as this indicates and
> end-of-file to Expat.
No. It's only the isFinal argument of XML_Parse() and XML_ParseBuffer(),
which inidicates, if the current chunk of data is the final one or
not. Empty chunks (len == 0) are OK, even with isFinal == 0.
rolf
> Also, are you sure that your XML is valid?
>
> -Ben Allison
>
>> Hi All,
>> I have just started trying to work with expat so that I can send out
>> a stream of XML data over a socket so that a client can display the
>> results. I have already written the server in java and am currently
>> coding up a client in C which is where expat comes in. The problem I
>> am having is that C reads the socket in chunks at a time and so when
>> I pass a chunk to expat it will often throw an error. What is the
>> best approach for this problem? Is there a way to tell expat to keep
>> parsing a stream of XML? Is expat even the right parser to use?
>> Any help is greatly appreciated.
>> Thanks,
>> Ben Pirt
>
> _______________________________________________
> Expat-discuss mailing list
> Expat-discuss at libexpat.org
> http://mail.libexpat.org/mailman/listinfo/expat-discuss
>
From benski at nullsoft.com Sun Jun 4 20:22:38 2006
From: benski at nullsoft.com (Ben Allison)
Date: Sun, 4 Jun 2006 14:22:38 -0400 (EDT)
Subject: [Expat-discuss] parsing a stream of XML over a socket
In-Reply-To: <20060604174721.29B3856C6C@pointsman.pointsman.de>
References: <1439.69.175.162.49.1149438890.squirrel@mail.winamp.com>
<20060604174721.29B3856C6C@pointsman.pointsman.de>
Message-ID: <4240.69.175.162.49.1149445358.squirrel@mail.winamp.com>
Woops, Sorry about that. My C++ wrapping code passes isFinal == 1
whenever the incoming data and length are 0, but you are correct that
expat handles 0 length just fine. Sorry for the confusion.
Ben Pirt - another thing to check might be if there is any HTTP reply data
embedded within your socket's stream that you're not accounting for.
> On 4 Jun, Ben Allison wrote:
>> Parsing a stream chunks at a time works perfectly fine. Just make sure
>> you never pass a zero-sized chunk of data, as this indicates and
>> end-of-file to Expat.
>
> No. It's only the isFinal argument of XML_Parse() and XML_ParseBuffer(),
> which inidicates, if the current chunk of data is the final one or
> not. Empty chunks (len == 0) are OK, even with isFinal == 0.
>
> rolf
>
>
>> Also, are you sure that your XML is valid?
>>
>> -Ben Allison
>>
>>> Hi All,
>>> I have just started trying to work with expat so that I can send out
>>> a stream of XML data over a socket so that a client can display the
>>> results. I have already written the server in java and am currently
>>> coding up a client in C which is where expat comes in. The problem I
>>> am having is that C reads the socket in chunks at a time and so when
>>> I pass a chunk to expat it will often throw an error. What is the
>>> best approach for this problem? Is there a way to tell expat to keep
>>> parsing a stream of XML? Is expat even the right parser to use?
>>> Any help is greatly appreciated.
>>> Thanks,
>>> Ben Pirt
>>
>> _______________________________________________
>> Expat-discuss mailing list
>> Expat-discuss at libexpat.org
>> http://mail.libexpat.org/mailman/listinfo/expat-discuss
>>
>
>
> _______________________________________________
> Expat-discuss mailing list
> Expat-discuss at libexpat.org
> http://mail.libexpat.org/mailman/listinfo/expat-discuss
>
>
From regis.st-gelais at laubrass.com Tue Jun 13 13:41:23 2006
From: regis.st-gelais at laubrass.com (=?Windows-1252?Q?R=E9gis_St-Gelais_=28Laubrass=29?=)
Date: Tue, 13 Jun 2006 07:41:23 -0400
Subject: [Expat-discuss] Expat on Palm OS?
Message-ID: <002e01c68ede$4c72e580$6400a8c0@laubrasssag1>
Does some one know if there is an Expat port to Palm OS?
Or any other XML parser?
Thanks,
Regis St-Gelais
www.laubrass.com
From maxb1 at ukf.net Tue Jun 13 22:57:12 2006
From: maxb1 at ukf.net (Max Bowsher)
Date: Tue, 13 Jun 2006 21:57:12 +0100
Subject: [Expat-discuss] Libtool versioning info bumped incorrectly in 2.0.0
?
Message-ID: <448F26A8.5030705@ukf.net>
I think that the libtool versioning info has been incorrectly bumped for
2.0.0.
All expat 1.95.x releases have shipped with LIBCURRENT==LIBAGE, implying
that whilst APIs may have been added, anything linked against old 1.95.x
releases ought to be able to continue to work if the expat shared
library is replaced with a newer release.
The 2.0.0 tarball ships with LIBCURRENT=6 and LIBAGE=5. This implies
that binary compatibility with expat 1.95.1 and earlier has been
explicitly broken, whilst binary compatibility with expat 1.95.2 and
later is retained. This seems an unlikely situation - more likely,
someone forgot to increment LIBAGE.
Note that this has caused libtool to now build Linux shared libraries
with a SONAME of libexpat.so.1, not libexpat.so.0, meaning that any
application linked against a shared libexpat 1.95.x will NEED A REBUILD
to work against a shared libexpat 2.0.0.
What is the true situation?
Max.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 188 bytes
Desc: OpenPGP digital signature
Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20060613/68173a5a/attachment.pgp
From karl at waclawek.net Wed Jun 14 01:58:20 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Tue, 13 Jun 2006 19:58:20 -0400
Subject: [Expat-discuss] Libtool versioning info bumped incorrectly in
2.0.0 ?
In-Reply-To: <448F26A8.5030705@ukf.net>
References: <448F26A8.5030705@ukf.net>
Message-ID: <448F511C.3070802@waclawek.net>
Max Bowsher wrote:
> I think that the libtool versioning info has been incorrectly bumped for
> 2.0.0.
>
>
> All expat 1.95.x releases have shipped with LIBCURRENT==LIBAGE, implying
> that whilst APIs may have been added, anything linked against old 1.95.x
> releases ought to be able to continue to work if the expat shared
> library is replaced with a newer release.
>
>
> The 2.0.0 tarball ships with LIBCURRENT=6 and LIBAGE=5. This implies
> that binary compatibility with expat 1.95.1 and earlier has been
> explicitly broken, whilst binary compatibility with expat 1.95.2 and
> later is retained. This seems an unlikely situation - more likely,
> someone forgot to increment LIBAGE.
>
>
> Note that this has caused libtool to now build Linux shared libraries
> with a SONAME of libexpat.so.1, not libexpat.so.0, meaning that any
> application linked against a shared libexpat 1.95.x will NEED A REBUILD
> to work against a shared libexpat 2.0.0.
>
>
> What is the true situation?
>
>
I tried to follow these rules:
http://www.gnu.org/software/libtool/manual.html#Updating-version-info .
Specifically, points 4 to 6 apply here:
4. If any interfaces have been added, removed, or changed since the
last update, increment current, and set revision to 0.
5. If any interfaces have been added since the last public release,
then increment age.
6. If any interfaces have been removed since the last public release,
then set age to 0.
Point 4) applies because XML_GetCurrentLineNumber() and
XML_GetCurrentColumnNumber() now return
unsigned integers. No interfaces have been added or removed, so 5) and
6) don't lead to any action.
Maybe this was wrong, but currently no Unix experts are active on Expat,
so I had to try my best.
Karl
From Mukesh.S at mphasis.com Fri Jun 16 13:50:52 2006
From: Mukesh.S at mphasis.com (Mukesh S)
Date: Fri, 16 Jun 2006 17:20:52 +0530
Subject: [Expat-discuss] Expat for Windows CE?
Message-ID: <7C83A8A6B56D3A478333B1DF47E185861F487B@MPBABGEX01.corp.mphasis.com>
Yeh,
Can I have expat library for wince, am really struggling to get,
Can you help me in these regards,
I want a expat library for wince
Waiting for your quick reply
Regards
Mukesh Srivastav | Mobile Team | M P H A S I S Architecting Value |
TECHNOLOGIES
Balaji Mansion, # 8/1 Bannerghatta Main Road, J P Nagar
Industrial Estate, Bangalore 560 076 | Tel: +91-80- 51537505, Extn:
444, | Mobile: +91-9980142921| http://www.mphasis.com
From karl at waclawek.net Sat Jun 17 15:51:23 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Sat, 17 Jun 2006 09:51:23 -0400
Subject: [Expat-discuss] Expat for Windows CE?
In-Reply-To: <7C83A8A6B56D3A478333B1DF47E185861F487B@MPBABGEX01.corp.mphasis.com>
References: <7C83A8A6B56D3A478333B1DF47E185861F487B@MPBABGEX01.corp.mphasis.com>
Message-ID: <449408DB.3000007@waclawek.net>
Mukesh S wrote:
> Yeh,
>
> Can I have expat library for wince, am really struggling to get,
>
> Can you help me in these regards,
>
>
For which CPU are you trying to build?
Karl
From karl at waclawek.net Sat Jun 17 17:41:16 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Sat, 17 Jun 2006 11:41:16 -0400
Subject: [Expat-discuss] Expat for Windows CE?
In-Reply-To: <7C83A8A6B56D3A478333B1DF47E185861F487B@MPBABGEX01.corp.mphasis.com>
References: <7C83A8A6B56D3A478333B1DF47E185861F487B@MPBABGEX01.corp.mphasis.com>
Message-ID: <4494229C.90909@waclawek.net>
Mukesh S wrote:
> Yeh,
>
> Can I have expat library for wince, am really struggling to get,
>
> Can you help me in these regards,
>
Google should give you some info.
I googled for "Expat Windows CE" and found this, for instance:
http://www.movsoftware.com/expatxml.htm
Karl
From Mukesh.S at mphasis.com Wed Jun 21 09:19:30 2006
From: Mukesh.S at mphasis.com (Mukesh S)
Date: Wed, 21 Jun 2006 12:49:30 +0530
Subject: [Expat-discuss] Problems with EXPAT for Windows CE
Message-ID: <7C83A8A6B56D3A478333B1DF47E18586222FD4@MPBABGEX01.corp.mphasis.com>
I am getting the same warning & errors, could you tell me,
How did you solve that problems ?
Regards
Mukesh Srivastav | Mobile Team | M P H A S I S Architecting Value |
TECHNOLOGIES
Balaji Mansion, # 8/1 Bannerghatta Main Road, J P Nagar
Industrial Estate, Bangalore 560 076 | Tel: +91-80- 51537505, Extn:
444, | Mobile: +91-9980142921| http://www.mphasis.com
From Mukesh.S at mphasis.com Wed Jun 21 09:07:54 2006
From: Mukesh.S at mphasis.com (Mukesh S)
Date: Wed, 21 Jun 2006 12:37:54 +0530
Subject: [Expat-discuss] Problems with EXPAT for Windows CE
Message-ID: <7C83A8A6B56D3A478333B1DF47E18586222FCC@MPBABGEX01.corp.mphasis.com>
Yeh,
Am getting the same errors, can you tell me how do you solve this
problem.
I am waiting for your quick reply.
Regards
Mukesh Srivastav | Mobile Team | M P H A S I S Architecting Value |
TECHNOLOGIES
Balaji Mansion, # 8/1 Bannerghatta Main Road, J P Nagar
Industrial Estate, Bangalore 560 076 | Tel: +91-80- 51537505, Extn:
444, | Mobile: +91-9980142921| http://www.mphasis.com
From Mukesh.S at mphasis.com Wed Jun 21 09:29:09 2006
From: Mukesh.S at mphasis.com (Mukesh S)
Date: Wed, 21 Jun 2006 12:59:09 +0530
Subject: [Expat-discuss] Problems with EXPAT for Windows CE
Message-ID: <7C83A8A6B56D3A478333B1DF47E18586222FDB@MPBABGEX01.corp.mphasis.com>
I AM GETTING THE SAME ERROR, CAN U PLS TELL ME HOW DID U RESOLVE THIS
PROBLEM.
Hi,
I'm trying to use Windows CE ported EXPAT version of movsoftware
(http://www.movsoftware.com/expatxml.htm). I have quite lot problems to
compile and use it.
When I open the project with "Visual C++" there are four projects
(gennmtab, xmlparse, xmltok, xmlwf). Trying to compile those I got a
whole lot of warnings:
------ Rebuild All started: Project: xmltok, Configuration: (WCE SH3)
Debug Win32 ------
Deleting intermediate files and output files for project 'xmltok',
configuration '(WCE SH3) Debug|Win32'.
Compiling...
xmltok.c
xmltok.c(1111) : warning C4273: 'XmlUtf8Encode' : inconsistent dll
linkage
xmltok.c(1147) : warning C4273: 'XmlUtf16Encode' : inconsistent dll
linkage
xmltok.c(1172) : warning C4273: 'XmlSizeOfUnknownEncoding' :
inconsistent dll linkage
xmltok.c(1263) : warning C4273: 'XmlInitUnknownEncoding' : inconsistent
dll linkage
c:\Documents and Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmltok\xmltok_ns.c(2) : warning C4273:
'XmlGetUtf8InternalEncoding' : inconsistent dll linkage
c:\Documents and Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmltok\xmltok_ns.c(7) : warning C4273:
'XmlGetUtf16InternalEncoding' : inconsistent dll linkage
c:\Documents and Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmltok\xmltok_ns.c(44) : warning C4273:
'XmlInitEncoding' : inconsistent dll linkage
c:\Documents and Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmltok\xmltok_ns.c(85) : warning C4273:
'XmlParseXmlDecl' : inconsistent dll linkage
xmlrole.c
xmlrole.c(1111) : warning C4273: 'XmlPrologStateInit' : inconsistent dll
linkage
dllmain.c
Generating Code...
Linking...
Creating library .\WCESH3Dbg/xmltok.lib and object
.\WCESH3Dbg/xmltok.exp
Build log was saved at "file://c:\Documents and
Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmltok\WCESH3Dbg\BuildLog.htm"
xmltok - 0 error(s), 9 warning(s)
------ Rebuild All started: Project: xmlparse, Configuration: (WCE SH3)
Debug Win32 ------
Deleting intermediate files and output files for project 'xmlparse',
configuration '(WCE SH3) Debug|Win32'.
Compiling...
xmlparse.c
xmlparse.c(410) : warning C4273: 'XML_ParserCreate' : inconsistent dll
linkage
xmlparse.c(483) : warning C4273: 'XML_ParserCreateNS' : inconsistent dll
linkage
xmlparse.c(512) : warning C4273: 'XML_SetEncoding' : inconsistent dll
linkage
xmlparse.c(526) : warning C4273: 'XML_ExternalEntityParserCreate' :
inconsistent dll linkage
xmlparse.c(595) : warning C4273: 'XML_ParserFree' : inconsistent dll
linkage
xmlparse.c(626) : warning C4273: 'XML_UseParserAsHandlerArg' :
inconsistent dll linkage
xmlparse.c(631) : warning C4273: 'XML_SetUserData' : inconsistent dll
linkage
xmlparse.c(639) : warning C4273: 'XML_SetBase' : inconsistent dll
linkage
xmlparse.c(652) : warning C4273: 'XML_GetBase' : inconsistent dll
linkage
xmlparse.c(657) : warning C4273: 'XML_GetSpecifiedAttributeCount' :
inconsistent dll linkage
xmlparse.c(664) : warning C4273: 'XML_SetElementHandler' : inconsistent
dll linkage
xmlparse.c(671) : warning C4273: 'XML_SetCharacterDataHandler' :
inconsistent dll linkage
xmlparse.c(677) : warning C4273: 'XML_SetProcessingInstructionHandler' :
inconsistent dll linkage
xmlparse.c(683) : warning C4273: 'XML_SetCommentHandler' : inconsistent
dll linkage
xmlparse.c(690) : warning C4273: 'XML_SetCdataSectionHandler' :
inconsistent dll linkage
xmlparse.c(697) : warning C4273: 'XML_SetDefaultHandler' : inconsistent
dll linkage
xmlparse.c(704) : warning C4273: 'XML_SetDefaultHandlerExpand' :
inconsistent dll linkage
xmlparse.c(711) : warning C4273: 'XML_SetUnparsedEntityDeclHandler' :
inconsistent dll linkage
xmlparse.c(717) : warning C4273: 'XML_SetNotationDeclHandler' :
inconsistent dll linkage
xmlparse.c(724) : warning C4273: 'XML_SetNamespaceDeclHandler' :
inconsistent dll linkage
xmlparse.c(731) : warning C4273: 'XML_SetNotStandaloneHandler' :
inconsistent dll linkage
xmlparse.c(737) : warning C4273: 'XML_SetExternalEntityRefHandler' :
inconsistent dll linkage
xmlparse.c(742) : warning C4273: 'XML_SetExternalEntityRefHandlerArg' :
inconsistent dll linkage
xmlparse.c(752) : warning C4273: 'XML_SetUnknownEncodingHandler' :
inconsistent dll linkage
xmlparse.c(758) : warning C4273: 'XML_Parse' : inconsistent dll linkage
xmlparse.c(812) : warning C4273: 'XML_ParseBuffer' : inconsistent dll
linkage
xmlparse.c(831) : warning C4273: 'XML_GetBuffer' : inconsistent dll
linkage
xmlparse.c(866) : warning C4273: 'XML_GetErrorCode' : inconsistent dll
linkage
xmlparse.c(871) : warning C4273: 'XML_GetCurrentByteIndex' :
inconsistent dll linkage
xmlparse.c(878) : warning C4273: 'XML_GetCurrentByteCount' :
inconsistent dll linkage
xmlparse.c(885) : warning C4273: 'XML_GetCurrentLineNumber' :
inconsistent dll linkage
xmlparse.c(894) : warning C4273: 'XML_GetCurrentColumnNumber' :
inconsistent dll linkage
xmlparse.c(903) : warning C4273: 'XML_DefaultCurrent' : inconsistent dll
linkage
xmlparse.c(916) : warning C4273: 'XML_ErrorString' : inconsistent dll
linkage
hashtable.c
Generating Code...
Linking...
Creating library .\WCESH3Dbg/xmlparse.lib and object
.\WCESH3Dbg/xmlparse.exp
Build log was saved at "file://c:\Documents and
Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmlparse\WCESH3Dbg\BuildLog.htm"
xmlparse - 0 error(s), 34 warning(s)
------ Rebuild All started: Project: gennmtab, Configuration: Debug
Win32 ------
Deleting intermediate files and output files for project 'gennmtab',
configuration 'Debug|Win32'.
Compiling...
gennmtab.c
Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to
'/INCREMENTAL:NO' specification
Build log was saved at "file://c:\Documents and
Settings\Tobias
Beisel\Desktop\expatCE-orginal\gennmtab\Debug\BuildLog.htm"
gennmtab - 0 error(s), 1 warning(s)
------ Rebuild All started: Project: xmlwf, Configuration: Debug Win32
------
Deleting intermediate files and output files for project 'xmlwf',
configuration 'Debug|Win32'.
Compiling...
xmlwf.c
c:\Documents and Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmlparse\xmlparse.h(41) : warning C4005:
'XMLPARSEAPI' : macro redefinition
command-line arguments : see previous definition of
'XMLPARSEAPI'
xmlfile.c
c:\Documents and Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmlparse\xmlparse.h(41) : warning C4005:
'XMLPARSEAPI' : macro redefinition
command-line arguments : see previous definition of
'XMLPARSEAPI'
win32filemap.c
codepage.c
Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to
'/INCREMENTAL:NO' specification
Build log was saved at "file://c:\Documents and
Settings\Tobias
Beisel\Desktop\expatCE-orginal\xmlwf\Debug\BuildLog.htm"
xmlwf - 0 error(s), 3 warning(s)
---------------------- Done ----------------------
Rebuild All: 4 succeeded, 0 failed, 0 skipped
Am I right to compile those sources with "Visual C++" using the
dll-files for windows CE afterwards?
After compiling it I got two dll-files (xmlparse.dll & xmltok.dll).
Using the corresponding ".lib"-files in my "eMbedded Visual C++" project
should make it possible to use a statement like:
XML_Parser p = XML_ParserCreate(NULL);
Shouldn't it? I included the ".lib"-files in "Project-> Settings ->
Link-> Object/library modules"
Unfortunately I get those error messages:
Linking...
parseLBS.obj : error LNK2019: unresolved external symbol
__imp_XML_GetCurrentLineNumber referenced in function parseLBS
parseLBS.obj : error LNK2019: unresolved external symbol
__imp_XML_GetCurrentColumnNumber referenced in function parseLBS
parseLBS.obj : error LNK2019: unresolved external symbol
__imp_XML_ErrorString referenced in function parseLBS
parseLBS.obj : error LNK2019: unresolved external symbol
__imp_XML_GetErrorCode referenced in function parseLBS
parseLBS.obj : error LNK2019: unresolved external symbol __imp_XML_Parse
referenced in function parseLBS
parseLBS.obj : error LNK2019: unresolved external symbol
__imp_XML_SetStartElementHandler referenced in function parseLBS
parseLBS.obj : error LNK2019: unresolved external symbol
__imp_XML_UseParserAsHandlerArg referenced in function parseLBS
parseLBS.obj : error LNK2019: unresolved external symbol
__imp_XML_ParserCreate referenced in function parseLBS
ARMV4Dbg/Client_CE.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.
Client_CE.exe - 9 error(s), 0 warning(s)
Am I using the sources the right way or do I have to compile or use it
differently?
Regards
Mukesh Srivastav | Mobile Team | M P H A S I S Architecting Value |
TECHNOLOGIES
Balaji Mansion, # 8/1 Bannerghatta Main Road, J P Nagar
Industrial Estate, Bangalore 560 076 | Tel: +91-80- 51537505, Extn:
444, | Mobile: +91-9980142921| http://www.mphasis.com
From karl at waclawek.net Wed Jun 21 18:08:22 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Wed, 21 Jun 2006 12:08:22 -0400
Subject: [Expat-discuss] Problems with EXPAT for Windows CE
In-Reply-To: <7C83A8A6B56D3A478333B1DF47E18586222FDB@MPBABGEX01.corp.mphasis.com>
References: <7C83A8A6B56D3A478333B1DF47E18586222FDB@MPBABGEX01.corp.mphasis.com>
Message-ID: <44996EF6.4060408@waclawek.net>
Mukesh S wrote:
> I AM GETTING THE SAME ERROR, CAN U PLS TELL ME HOW DID U RESOLVE THIS
> PROBLEM.
> Hi,
>
>
I have never tried to build for Windows CE.
Just trying to point you to some resources.
The site at http://www.movsoftware.com/expatxml.htm seems to use a very
old version of Expat,
but you might try to study what they did differently for Windows CE.
I also found this page, where you can download Expat for CE on Symbian:
http://www.simkin.co.uk/Order.shtml
You should now be able to do your own research.
Karl
Karl
From greenemk at cox.net Mon Jun 26 13:14:07 2006
From: greenemk at cox.net (Michael Greene)
Date: Mon, 26 Jun 2006 07:14:07 -0400
Subject: [Expat-discuss] Expat and Open Watcom
Message-ID: <449FC17F.1070006@cox.net>
I have been putting together makefiles for compiling expat 2.0.0 with
Open Watcom on OS/2 and NT. Everything is working except for one test fail:
Expat version: expat_2.0.0
..\tests\runtests.c:1201: external_entity_handler
97%: Checks: 48, Failed: 1
The test is : test_default_ns_from_ext_subset_and_ext_ge.
Is there a place to start finding the cause? I see that
external_entity_handler is "Regression test for SF bug #616863".
MikeG
From karl at waclawek.net Mon Jun 26 16:26:18 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Mon, 26 Jun 2006 10:26:18 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <449FC17F.1070006@cox.net>
References: <449FC17F.1070006@cox.net>
Message-ID: <449FEE8A.10903@waclawek.net>
Michael Greene wrote:
> I have been putting together makefiles for compiling expat 2.0.0 with
> Open Watcom on OS/2 and NT. Everything is working except for one test fail:
>
> Expat version: expat_2.0.0
> ..\tests\runtests.c:1201: external_entity_handler
> 97%: Checks: 48, Failed: 1
>
> The test is : test_default_ns_from_ext_subset_and_ext_ge.
>
> Is there a place to start finding the cause? I see that
> external_entity_handler is "Regression test for SF bug #616863".
>
>
Try to run Expat directly on the XML document in the test case, and see what
the error is, and on which line/column it happens.
Karl
From greenemk at cox.com Mon Jun 26 19:11:05 2006
From: greenemk at cox.com (Michael Greene)
Date: Mon, 26 Jun 2006 13:11:05 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <449FEE8A.10903@waclawek.net>
References: <449FC17F.1070006@cox.net> <449FEE8A.10903@waclawek.net>
Message-ID: <44A01529.9090501@cox.com>
Karl Waclawek wrote:
> Michael Greene wrote:
>> I have been putting together makefiles for compiling expat 2.0.0 with
>> Open Watcom on OS/2 and NT. Everything is working except for one test
>> fail:
>>
>> Expat version: expat_2.0.0
>> ..\tests\runtests.c:1201: external_entity_handler
>> 97%: Checks: 48, Failed: 1
>>
>> The test is : test_default_ns_from_ext_subset_and_ext_ge.
>>
>> Is there a place to start finding the cause? I see that
>> external_entity_handler is "Regression test for SF bug #616863".
>>
>>
>
> Try to run Expat directly on the XML document in the test case, and see
> what
> the error is, and on which line/column it happens.
>
> Karl
>
Karl,
Thanks for the reply. I am not an expat/xml expert, do you mean run this:
xmlwf -p i18n.xml
I get nothing so I expect it is ok?
I did try the XML-Test-Suite and it completes with Passed: 1680 Failed:
130. Other than file differs messages, I get these errors:
003.ent: out of memory
In xmltest/valid/ext-sa/: 003.xml:5:5: error in processing external
entity reference
010.ent: out of memory
In xmltest/valid/ext-sa/: 010.xml:5:5: error in processing external
entity reference
null.ent: out of memory
In sun/valid/: ext01.xml:9:21: error in processing external entity reference
In sun/valid/: pe02.xml:8:26: undefined entity
050.xml: out of memory
Expected well-formed: xmltest/not-wf/sa/050.xml
p39fail3.xml: out of memory
Expected well-formed: oasis/p39fail3.xml
MikeG
From karl at waclawek.net Mon Jun 26 19:37:07 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Mon, 26 Jun 2006 13:37:07 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A01529.9090501@cox.com>
References: <449FC17F.1070006@cox.net> <449FEE8A.10903@waclawek.net>
<44A01529.9090501@cox.com>
Message-ID: <44A01B43.4000502@waclawek.net>
Michael Greene wrote:
>
> Thanks for the reply. I am not an expat/xml expert, do you mean run this:
>
> xmlwf -p i18n.xml
>
> I get nothing so I expect it is ok?
It would indicate that in the test code, the actual call to the parsing
function did not return an error.
So something else went wrong. Something could be wrong with memory
allocations, as you
get out of memory errors. Hard to diagnose from here - and I don't know
anything about Open Watcom.
Karl
From karl at waclawek.net Tue Jun 27 02:23:26 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Mon, 26 Jun 2006 20:23:26 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A0656D.8060809@cox.com>
References: <449FC17F.1070006@cox.net>
<449FEE8A.10903@waclawek.net> <44A01529.9090501@cox.com>
<44A01B43.4000502@waclawek.net> <44A0656D.8060809@cox.com>
Message-ID: <44A07A7E.6030903@waclawek.net>
Michael Greene wrote:
> Karl Waclawek wrote:
>> Michael Greene wrote:
>>> Thanks for the reply. I am not an expat/xml expert, do you mean run
>>> this:
>>>
>>> xmlwf -p i18n.xml
>>>
>>> I get nothing so I expect it is ok?
>>
>> It would indicate that in the test code, the actual call to the
>> parsing function did not return an error.
>> So something else went wrong. Something could be wrong with memory
>> allocations, as you
>> get out of memory errors. Hard to diagnose from here - and I don't
>> know anything about Open Watcom.
>>
>> Karl
>
> Thanks for the all the responses, but it seems in that I was missing
> the XML_DTD define. Now runtests.exe completes 100%. I still need to
> track the errors with the XML_TEST_SUITE.
>
>
Not all errors are errors (I mean mostly those that say "Output
differs", but also others).
Some are simply a result of xmlwf having a different definition of
canonical XML
than the current standard. There is an open bug (#569461) where the XML
test suite is discussed.
Also the code running the test suite isn't ideal - it doesn't process
the XML file that describes
the test cases, but processes them based on the directory structure,
which is not 100% correct.
Overall, Expat is close to 100% compliant.
Karl
From greenemk at cox.com Tue Jun 27 00:53:33 2006
From: greenemk at cox.com (Michael Greene)
Date: Mon, 26 Jun 2006 18:53:33 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A01B43.4000502@waclawek.net>
References: <449FC17F.1070006@cox.net>
<449FEE8A.10903@waclawek.net> <44A01529.9090501@cox.com>
<44A01B43.4000502@waclawek.net>
Message-ID: <44A0656D.8060809@cox.com>
Karl Waclawek wrote:
> Michael Greene wrote:
>> Thanks for the reply. I am not an expat/xml expert, do you mean run this:
>>
>> xmlwf -p i18n.xml
>>
>> I get nothing so I expect it is ok?
>
> It would indicate that in the test code, the actual call to the parsing
> function did not return an error.
> So something else went wrong. Something could be wrong with memory
> allocations, as you
> get out of memory errors. Hard to diagnose from here - and I don't know
> anything about Open Watcom.
>
> Karl
Thanks for the all the responses, but it seems in that I was missing the
XML_DTD define. Now runtests.exe completes 100%. I still need to track
the errors with the XML_TEST_SUITE.
MikeG
From Mukesh.S at mphasis.com Tue Jun 27 06:08:29 2006
From: Mukesh.S at mphasis.com (Mukesh S)
Date: Tue, 27 Jun 2006 09:38:29 +0530
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A0656D.8060809@cox.com>
Message-ID: <7C83A8A6B56D3A478333B1DF47E1858622359F@MPBABGEX01.corp.mphasis.com>
I HAVE DONE IT,
NOW AM ABLE TO USE EXPAT & WBXML FOR WINCE DEVICES.
IT WAS VERY DIFFICULT TASK, BUT I HAVE DONE IT.
CHEERS TO ALL.
Regards
Mukesh Srivastav | Mobile Team | M P H A S I S Architecting Value |
TECHNOLOGIES
Balaji Mansion, # 8/1 Bannerghatta Main Road, J P Nagar
Industrial Estate, Bangalore 560 076 | Tel: +91-80- 51537505, Extn:
444, | Mobile: +91-9980142921| http://www.mphasis.com
-----Original Message-----
From: expat-discuss-bounces at libexpat.org
[mailto:expat-discuss-bounces at libexpat.org] On Behalf Of Michael Greene
Sent: Tuesday, June 27, 2006 4:24 AM
To: Karl Waclawek
Cc: expat-discuss at libexpat.org
Subject: Re: [Expat-discuss] Expat and Open Watcom
Karl Waclawek wrote:
> Michael Greene wrote:
>> Thanks for the reply. I am not an expat/xml expert, do you mean run
this:
>>
>> xmlwf -p i18n.xml
>>
>> I get nothing so I expect it is ok?
>
> It would indicate that in the test code, the actual call to the
parsing
> function did not return an error.
> So something else went wrong. Something could be wrong with memory
> allocations, as you
> get out of memory errors. Hard to diagnose from here - and I don't
know
> anything about Open Watcom.
>
> Karl
Thanks for the all the responses, but it seems in that I was missing the
XML_DTD define. Now runtests.exe completes 100%. I still need to track
the errors with the XML_TEST_SUITE.
MikeG
_______________________________________________
Expat-discuss mailing list
Expat-discuss at libexpat.org
http://mail.libexpat.org/mailman/listinfo/expat-discuss
From karl at waclawek.net Tue Jun 27 15:14:49 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Tue, 27 Jun 2006 09:14:49 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <7C83A8A6B56D3A478333B1DF47E1858622359F@MPBABGEX01.corp.mphasis.com>
References: <7C83A8A6B56D3A478333B1DF47E1858622359F@MPBABGEX01.corp.mphasis.com>
Message-ID: <44A12F49.7050205@waclawek.net>
Mukesh S wrote:
>
> I HAVE DONE IT,
>
> NOW AM ABLE TO USE EXPAT & WBXML FOR WINCE DEVICES.
>
> IT WAS VERY DIFFICULT TASK, BUT I HAVE DONE IT.
>
> CHEERS TO ALL.
>
>
>
Would you mind sharing with us how you managed to build Expat on WinCE,
so that others can benefit from your experience?
Thanks,
Karl
From karl at waclawek.net Tue Jun 27 15:33:07 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Tue, 27 Jun 2006 09:33:07 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A11C81.10701@cox.com>
References: <449FC17F.1070006@cox.net> <449FEE8A.10903@waclawek.net> <44A01529.9090501@cox.com> <44A01B43.4000502@waclawek.net>
<44A0656D.8060809@cox.com> <44A07A7E.6030903@waclawek.net>
<44A11C81.10701@cox.com>
Message-ID: <44A13393.7050208@waclawek.net>
Michael Greene wrote:
> Karl,
>
> The source of my "out of memory" errors when running XML_TEST_SUITE
> are due to the test file size and using readfilemap.c. The test suite
> files are size 0, so malloc( 0 ) returns NULL and I get a false "out
> of memory" error. I assume that any build that uses readfilemap.c
> would have this return. Would it be better to do this:
>
> nbytes = sb.st_size;
> + if(nbytes == 0) {
> + close(fd);
> + return 1;
> + }
> p = malloc(nbytes);
> if (!p) {
> + close(fd);
> return 0;
> }
>
> So that nbytes is checked for 0 size and return 1 ?
>
> With this change and a couple other defines I am at:
>
> Passed: 1773
> Failed: 37
>
>
That sounds pretty good!
Would you please file a bug report for readfilemap.c?
I'll then commit your patch.
Thanks,
Karl
From greenemk at cox.com Tue Jun 27 13:54:41 2006
From: greenemk at cox.com (Michael Greene)
Date: Tue, 27 Jun 2006 07:54:41 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A07A7E.6030903@waclawek.net>
References: <449FC17F.1070006@cox.net> <449FEE8A.10903@waclawek.net> <44A01529.9090501@cox.com> <44A01B43.4000502@waclawek.net>
<44A0656D.8060809@cox.com> <44A07A7E.6030903@waclawek.net>
Message-ID: <44A11C81.10701@cox.com>
Karl Waclawek wrote:
> Michael Greene wrote:
>> Karl Waclawek wrote:
>>> Michael Greene wrote:
> old removed
>>> Karl
>> Thanks for the all the responses, but it seems in that I was missing
>> the XML_DTD define. Now runtests.exe completes 100%. I still need to
>> track the errors with the XML_TEST_SUITE.
>>
>>
> Not all errors are errors (I mean mostly those that say "Output
> differs", but also others).
> Some are simply a result of xmlwf having a different definition of
> canonical XML
> than the current standard. There is an open bug (#569461) where the XML
> test suite is discussed.
> Also the code running the test suite isn't ideal - it doesn't process
> the XML file that describes
> the test cases, but processes them based on the directory structure,
> which is not 100% correct.
>
> Overall, Expat is close to 100% compliant.
>
> Karl
Karl,
The source of my "out of memory" errors when running XML_TEST_SUITE are
due to the test file size and using readfilemap.c. The test suite files
are size 0, so malloc( 0 ) returns NULL and I get a false "out of
memory" error. I assume that any build that uses readfilemap.c would
have this return. Would it be better to do this:
nbytes = sb.st_size;
+ if(nbytes == 0) {
+ close(fd);
+ return 1;
+ }
p = malloc(nbytes);
if (!p) {
+ close(fd);
return 0;
}
So that nbytes is checked for 0 size and return 1 ?
With this change and a couple other defines I am at:
Passed: 1773
Failed: 37
MikeG
From greenemk at cox.com Tue Jun 27 22:21:29 2006
From: greenemk at cox.com (Michael Greene)
Date: Tue, 27 Jun 2006 16:21:29 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A13393.7050208@waclawek.net>
References: <449FC17F.1070006@cox.net> <449FEE8A.10903@waclawek.net> <44A01529.9090501@cox.com> <44A01B43.4000502@waclawek.net> <44A0656D.8060809@cox.com>
<44A07A7E.6030903@waclawek.net> <44A11C81.10701@cox.com>
<44A13393.7050208@waclawek.net>
Message-ID: <44A19349.6060803@cox.com>
Karl Waclawek wrote:
> Michael Greene wrote:
>> Karl,
>>
>> The source of my "out of memory" errors when running XML_TEST_SUITE
>> are due to the test file size and using readfilemap.c. The test suite
>> files are size 0, so malloc( 0 ) returns NULL and I get a false "out
>> of memory" error. I assume that any build that uses readfilemap.c
>> would have this return. Would it be better to do this:
>>
>> nbytes = sb.st_size;
>> + if(nbytes == 0) {
>> + close(fd);
>> + return 1;
>> + }
>> p = malloc(nbytes);
>> if (!p) {
>> + close(fd);
>> return 0;
>> }
>>
>> So that nbytes is checked for 0 size and return 1 ?
>>
>> With this change and a couple other defines I am at:
>>
>> Passed: 1773
>> Failed: 37
>>
>>
>
> That sounds pretty good!
>
> Would you please file a bug report for readfilemap.c?
> I'll then commit your patch.
>
> Thanks,
>
> Karl
>
Submitted #1513566 - sorry about the WATCOM define include.
MikeG
From greenemk at cox.com Wed Jun 28 02:57:43 2006
From: greenemk at cox.com (Michael Greene)
Date: Tue, 27 Jun 2006 20:57:43 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A19349.6060803@cox.com>
References: <449FC17F.1070006@cox.net> <449FEE8A.10903@waclawek.net> <44A01529.9090501@cox.com> <44A01B43.4000502@waclawek.net> <44A0656D.8060809@cox.com> <44A07A7E.6030903@waclawek.net> <44A11C81.10701@cox.com> <44A13393.7050208@waclawek.net>
<44A19349.6060803@cox.com>
Message-ID: <44A1D407.8010203@cox.com>
Michael Greene wrote:
> Karl Waclawek wrote:
>> Michael Greene wrote:
>>> Karl,
>>>
>>> The source of my "out of memory" errors when running XML_TEST_SUITE
>>> are due to the test file size and using readfilemap.c. The test suite
>>> files are size 0, so malloc( 0 ) returns NULL and I get a false "out
>>> of memory" error. I assume that any build that uses readfilemap.c
>>> would have this return. Would it be better to do this:
>>>
>>> nbytes = sb.st_size;
>>> + if(nbytes == 0) {
>>> + close(fd);
>>> + return 1;
>>> + }
>>> p = malloc(nbytes);
>>> if (!p) {
>>> + close(fd);
>>> return 0;
>>> }
>>>
>>> So that nbytes is checked for 0 size and return 1 ?
>>>
>>> With this change and a couple other defines I am at:
>>>
>>> Passed: 1773
>>> Failed: 37
>>>
>>>
>> That sounds pretty good!
>>
>> Would you please file a bug report for readfilemap.c?
>> I'll then commit your patch.
>>
>> Thanks,
>>
>> Karl
>>
>
> Submitted #1513566 - sorry about the WATCOM define include.
>
> MikeG
Karl,
Just as a side note I compiled expat 2.0.0 with my linux system to
verify my Open Watcom build results. Good news my Open Watcom version
only gives me these additional errors over the linux - gcc build:
Output differs: xmltest/valid/sa/069.xml
Output differs: xmltest/valid/sa/076.xml
Output differs: xmltest/valid/sa/090.xml
Output differs: xmltest/valid/sa/091.xml
However, the linux - gcc build had these errors (not in order):
003.ent: Invalid argument
In xmltest/valid/ext-sa/: 003.xml:5:5: error in processing external
entity reference
010.ent: Invalid argument
In xmltest/valid/ext-sa/: 010.xml:5:5: error in processing external
entity reference
001.ent: Invalid argument
In xmltest/valid/not-sa/: 001.xml:3:1: error in processing external
entity reference
003-2.ent: Invalid argument
In xmltest/valid/not-sa/: 003-1.ent:3:23: error in processing external
entity reference
null.ent: Invalid argument
In sun/valid/: ext01.xml:9:21: error in processing external entity reference
p31pass1.dtd: Invalid argument
In oasis/: p31pass1.xml:1:58: error in processing external entity reference
050.xml: Invalid argument
Expected well-formed: oasis/p39fail3.xml
Reason I call this out is because I think it is the same problem in
unixfilemap.c. The mmap( ) returns failed because of zero file size when
it should have a check like readfilemap.c (my fix) and win32filemap.c.
It is rare for me to start linux and just as rare to use gcc.
MikeG
From karl at waclawek.net Wed Jun 28 04:42:26 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Tue, 27 Jun 2006 22:42:26 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A1D407.8010203@cox.com>
References: <449FC17F.1070006@cox.net> <449FEE8A.10903@waclawek.net> <44A01529.9090501@cox.com> <44A01B43.4000502@waclawek.net> <44A0656D.8060809@cox.com> <44A07A7E.6030903@waclawek.net> <44A11C81.10701@cox.com> <44A13393.7050208@waclawek.net>
<44A19349.6060803@cox.com> <44A1D407.8010203@cox.com>
Message-ID: <44A1EC92.5060007@waclawek.net>
Michael Greene wrote:
> Karl,
>
> Just as a side note I compiled expat 2.0.0 with my linux system to
> verify my Open Watcom build results. Good news my Open Watcom version
> only gives me these additional errors over the linux - gcc build:
>
> Output differs: xmltest/valid/sa/069.xml
> Output differs: xmltest/valid/sa/076.xml
> Output differs: xmltest/valid/sa/090.xml
> Output differs: xmltest/valid/sa/091.xml
>
> However, the linux - gcc build had these errors (not in order):
>
> 003.ent: Invalid argument
> In xmltest/valid/ext-sa/: 003.xml:5:5: error in processing external
> entity reference
>
> 010.ent: Invalid argument
> In xmltest/valid/ext-sa/: 010.xml:5:5: error in processing external
> entity reference
>
> 001.ent: Invalid argument
> In xmltest/valid/not-sa/: 001.xml:3:1: error in processing external
> entity reference
>
> 003-2.ent: Invalid argument
> In xmltest/valid/not-sa/: 003-1.ent:3:23: error in processing external
> entity reference
>
> null.ent: Invalid argument
> In sun/valid/: ext01.xml:9:21: error in processing external entity
> reference
>
> p31pass1.dtd: Invalid argument
> In oasis/: p31pass1.xml:1:58: error in processing external entity
> reference
>
> 050.xml: Invalid argument
>
> Expected well-formed: oasis/p39fail3.xml
>
> Reason I call this out is because I think it is the same problem in
> unixfilemap.c. The mmap( ) returns failed because of zero file size
> when it should have a check like readfilemap.c (my fix) and
> win32filemap.c. It is rare for me to start linux and just as rare to
> use gcc.
>
Thanks for being so thorough. I think you are right. Did you re-run the
Linux build with your fix applied to unixfilemap.c?
Does that fix the errors?
If yes (I assume), I'll commit the same fix for unixfilemap.c.
Karl
From f.braem at skynet.be Wed Jun 28 21:45:42 2006
From: f.braem at skynet.be (Franky Braem)
Date: Wed, 28 Jun 2006 21:45:42 +0200
Subject: [Expat-discuss] UNICODE and weird characters
Message-ID: <44A2DC66.5010908@skynet.be>
I've build expat 2.0 with UNICODE. This uses internally UTF-16 and wchar_t.
When I use the parser, it sees all the tags, but the strings it reports
contain weird (Chinese) characters. This is an example code:
void ModulesXMLParser::StartElementHandler(void *userData,
const XML_Char *name,
const XML_Char **atts)
{
wxString xmlName(name);
...
}
Why do I see those Chinese characters (although my xml file contains
simple characters)?
From franky.braem at gmail.com Wed Jun 28 22:30:41 2006
From: franky.braem at gmail.com (Franky Braem)
Date: Wed, 28 Jun 2006 22:30:41 +0200
Subject: [Expat-discuss] UNICODE utf-16 and weird characters
Message-ID: <44A2E6F1.5090608@gmail.com>
I've build expat 2.0 with UNICODE. This uses internally UTF-16 and wchar_t.
When I use the parser, it sees all the tags, but the strings it reports
contain weird (Chinese) characters. This is an example code:
void ModulesXMLParser::StartElementHandler(void *userData,
const XML_Char *name,
const XML_Char **atts)
{
wxString xmlName(name);
...
}
Why do I see those Chinese characters (although my xml file contains
simple characters)?
From karl at waclawek.net Thu Jun 29 01:01:47 2006
From: karl at waclawek.net (Karl Waclawek)
Date: Wed, 28 Jun 2006 19:01:47 -0400
Subject: [Expat-discuss] Expat and Open Watcom
In-Reply-To: <44A19349.6060803@cox.com>
References: <449FC17F.1070006@cox.net> <449FEE8A.10903@waclawek.net> <44A01529.9090501@cox.com> <44A01B43.4000502@waclawek.net> <44A0656D.8060809@cox.com>
<44A07A7E.6030903@waclawek.net> <44A11C81.10701@cox.com>
<44A13393.7050208@waclawek.net> <44A19349.6060803@cox.com>
Message-ID: <44A30A5B.7070600@waclawek.net>
Michael Greene wrote:
>>>
>>> With this change and a couple other defines I am at:
>>>
>>> Passed: 1773
>>> Failed: 37
>>>
Forgot to mention: your personal e-mail address does not seem to work
for me.
Replies get bounced back with
Status: 550 Mailbox unavailable or access denied -
Karl
From gnschmidt at ukonline.co.uk Thu Jun 29 13:22:17 2006
From: gnschmidt at ukonline.co.uk (gnschmidt at ukonline.co.uk)
Date: Thu, 29 Jun 2006 12:22:17 +0100
Subject: [Expat-discuss] UNICODE utf-16 and weird characters
In-Reply-To: <44A2E6F1.5090608@gmail.com>
References: <44A2E6F1.5090608@gmail.com>
Message-ID: <1151580137.44a3b7e9e7612@webmail.ukonline.net>
Franky
I think the problem is the wxString constructor, which defaults to wxConvLocal
for conversions. I know wxConvUTF8 is predefined, but I'm not sure if the same
is true of wxConvUTF16.
For the non-Unicode build, the following works without problems:
wxString xmlName = wxString(name, wxConvUTF8, strlen(name));
It should be possible to adapt this to use wxConvUTF16 instead (if wxConvUTF16
isn't predefined wxWidgets will let you create an instance).
Quoting Franky Braem :
> I've build expat 2.0 with UNICODE. This uses internally UTF-16 and wchar_t.
>
> When I use the parser, it sees all the tags, but the strings it reports
> contain weird (Chinese) characters. This is an example code:
>
> void ModulesXMLParser::StartElementHandler(void *userData,
> const XML_Char *name,
> const XML_Char **atts)
> {
> wxString xmlName(name);
> ...
> }
>
> Why do I see those Chinese characters (although my xml file contains
> simple characters)?
> _______________________________________________
> Expat-discuss mailing list
> Expat-discuss at libexpat.org
> http://mail.libexpat.org/mailman/listinfo/expat-discuss
>
----------------------------------------------
This mail sent through http://www.ukonline.net