summaryrefslogtreecommitdiff
path: root/src/core/implementation.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-30 21:10:50 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-30 21:10:50 +0000
commite0e38d906c8974bb22a0368a9709af9590362927 (patch)
treef7f4c1acff769e9a7f6cd0f1c037ba2c28a66593 /src/core/implementation.c
parent49e419c9b75cc149e7f4c898c31aed33f4b2c960 (diff)
downloadlibdom-e0e38d906c8974bb22a0368a9709af9590362927.tar.gz
libdom-e0e38d906c8974bb22a0368a9709af9590362927.tar.bz2
DOM Strings are now capable of containing either UTF-8 or UTF-16 encoded data.
The charset used for strings within a document is specified at document creation time. Whilst it is possible to mix charsets within a document, it's not recommended. Things that need fixing: + dom_string_get_data() doesn't return the charset. Better would be to permit the client to request a charset for the data to be returned in. + Interned node name strings will break if the document is UTF-16 (dom_document_create()). In fact, these could quite happily be globals, rather than allocating a set for each document. + Other usage of dom string constructors need checking for sanity + DOM Strings need to gain more utility APIs (such as getting the character length of a string, string concatenation etc). svn path=/trunk/dom/; revision=3614
Diffstat (limited to 'src/core/implementation.c')
-rw-r--r--src/core/implementation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/implementation.c b/src/core/implementation.c
index e37b27d..9738b7c 100644
--- a/src/core/implementation.c
+++ b/src/core/implementation.c
@@ -94,6 +94,7 @@ dom_exception dom_implementation_create_document_type(
* \param qname The qualified name of the document element
* \param doctype The type of document to create
* \param doc Pointer to location to receive result
+ * \param charset The charset to use for strings in the document
* \param alloc Memory (de)allocation function
* \param pw Pointer to client-specific private data
* \return DOM_NO_ERR on success,
@@ -126,10 +127,11 @@ dom_exception dom_implementation_create_document(
struct dom_string *namespace, struct dom_string *qname,
struct dom_document_type *doctype,
struct dom_document **doc,
+ dom_string_charset charset,
dom_alloc alloc, void *pw)
{
return impl->create_document(impl, namespace, qname, doctype, doc,
- alloc, pw);
+ charset, alloc, pw);
}
/**