UIMA-1707

git-svn-id: https://svn.apache.org/repos/asf/incubator/uima/uimacpp/branches/uimacpp-2.3.0@890945 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/cas/xmiwriter.cpp b/src/cas/xmiwriter.cpp
index 2cab3a5..1b556b0 100644
--- a/src/cas/xmiwriter.cpp
+++ b/src/cas/xmiwriter.cpp
@@ -741,7 +741,10 @@
       //attributes
       for (size_t a=0; a < oed->attributes.size(); a++) {
         XmlAttribute * attr = oed->attributes.at(a);
-        os << " " << attr->name << "=\"" << attr->value << "\"";
+        icu::UnicodeString us;
+        icu::UnicodeString av(attr->value.c_str());
+        normalize( av, us );
+        os << " " << attr->name << "=\"" << us << "\"";
       }
       //child elements
       map<string,vector<string>*>::iterator ite ;
@@ -749,8 +752,11 @@
         ite != oed->childElements.end(); ite++) {
           vector<string> * values = ite->second;
           for (size_t v=0; v < values->size();v++) {
+            icu::UnicodeString us;
+            icu::UnicodeString av(values->at(v).c_str());
+            normalize( av, us );
             strcontent << " <" << ite->first 
-              << ">" << values->at(v) 
+              << ">" << us
               << "</" << ite->first << ">";
           }
         }
@@ -1197,7 +1203,10 @@
     // Add other attributes
     for (size_t a=0; a < oed->attributes.size();a++) {
       XmlAttribute * attr = oed->attributes.at(a);
-      os << " " << attr->name << "=\"" << attr->value << "\"";
+      icu::UnicodeString us;
+      icu::UnicodeString av(attr->value.c_str());
+      normalize( av, us );
+      os << " " << attr->name << "=\"" << us << "\"";
     }
     if (oed->childElements.size() > 0) {
       os << ">";
@@ -1206,8 +1215,11 @@
       for (ite = oed->childElements.begin(); ite != oed->childElements.end();ite++ ) {
         vector<string> * values = ite->second;
         for (size_t v=0; v < values->size(); v++) {
+	        icu::UnicodeString us;
+			icu::UnicodeString av(values->at(v).c_str());
+			normalize( av, us );
           os << " <" << ite->first << ">";
-          os << values->at(v); 
+          os << us;
           os << "</" << ite->first << ">";
         }
       }