[redland-dev] raptor rdf/xml parsing and encoding
Sebastian Trüg
strueg at mandriva.com
Thu May 29 16:54:04 BST 2008
The raptor API says that all strings (URIs and literals) are utf8. However,
when parsing a file with encoding UTF-8 or encoding ISO8859-1 containing a
literal with a german umlaut, I do not get utf8 in either case.
So before searching though the raptor code and trying to figure it out by
myself two questions:
- Does raptor ALWAYS produce utf8 strings?
- Is the following code acceptable:
void raptorTriplesHandler( void* userData, const raptor_statement* triple )
{
[...]
switch( triple->object_type ) {
case RAPTOR_IDENTIFIER_TYPE_LITERAL:
fromUtf8( (const char*)triple->object );
[...]
}
[...]
}
Thanks a lot,
Sebastian Trüg
More information about the redland-dev
mailing list