/*
- * Copyright 2001-2006 Internet2
+ * Copyright 2001-2007 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Helper classes and types for manipulating Unicode
*/
-#if !defined(__xmltooling_unicode_h__)
+#ifndef __xmltooling_unicode_h__
#define __xmltooling_unicode_h__
+#include <xmltooling/base.h>
+
#include <string>
+#include <iostream>
#include <xercesc/util/XMLString.hpp>
-#include <xmltooling/base.h>
using namespace xercesc;
extern XMLTOOL_API XMLCh* fromUTF8(const char* src);
/**
+ * Writes a Unicode string to an ASCII stream by transcoding to UTF8.
+ *
+ * @param ostr stream to write to
+ * @param s string to write
+ * @return reference to output stream
+ */
+ extern XMLTOOL_API std::ostream& operator<<(std::ostream& ostr, const XMLCh* s);
+
+ /**
* A minimal auto_ptr-like class that can copy or transcode a buffer into
* the local code page and free the result automatically.
*