[Ocipl-commits] SF.net SVN: ocipl: [38] trunk/xmlstorage/xs-native.cpp
Brought to you by:
martinfuchs
|
From: <mar...@us...> - 2008-02-04 09:25:11
|
Revision: 38
http://ocipl.svn.sourceforge.net/ocipl/?rev=38&view=rev
Author: martinfuchs
Date: 2008-02-04 01:25:15 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
XMLStorage: allow UTF-8 encoded umlaut characters in tag names
Modified Paths:
--------------
trunk/xmlstorage/xs-native.cpp
Modified: trunk/xmlstorage/xs-native.cpp
===================================================================
--- trunk/xmlstorage/xs-native.cpp 2007-10-28 16:31:12 UTC (rev 37)
+++ trunk/xmlstorage/xs-native.cpp 2008-02-04 09:25:15 UTC (rev 38)
@@ -93,7 +93,7 @@
_buffer_str.erase();
}
- void append(char c)
+ void append(int c)
{
size_t wpos = _wptr-_buffer;
@@ -103,7 +103,7 @@
_wptr = _buffer + wpos;
}
- *_wptr++ = c;
+ *_wptr++ = static_cast<char>(c);
}
const std::string& str(bool utf8) // returns UTF-8 encoded buffer content
@@ -148,8 +148,7 @@
if (*q == '?')
++q;
- while(isxmlsym(*q))
- ++q;
+ q = get_xmlsym_end_utf8(q);
#ifdef XS_STRING_UTF8
return XS_String(p, q-p);
@@ -174,8 +173,7 @@
else if (*p == '?')
++p;
- while(isxmlsym(*p))
- ++p;
+ p = get_xmlsym_end_utf8(p);
// read attributes from buffer
while(*p && *p!='>' && *p!='/') {
@@ -184,8 +182,7 @@
const char* attr_name = p;
- while(isxmlsym(*p))
- ++p;
+ p = get_xmlsym_end_utf8(p);
if (*p != '=')
break; //@TODO error handling
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|