diff --git a/samples/DOMPrint/DOMPrint.cpp b/samples/DOMPrint/DOMPrint.cpp
index 6cde5ee5ff091df7e580d49ebe1cbc868782933a..55f50fef55126c455510b8360af4d8777b011f34 100644
--- a/samples/DOMPrint/DOMPrint.cpp
+++ b/samples/DOMPrint/DOMPrint.cpp
@@ -187,8 +187,12 @@ public:
     // -----------------------------------------------------------------------
     void writeChars(const   XMLByte* const  toWrite)
     {
-        // For this one, just dump them to the standard output
-        cout << toWrite;
+        // Surprisingly, Solaris was the only platform on which
+        // required the char* cast to print out the string correctly.
+        // Without the cast, it was printing the pointer value in hex.
+        // Quite annoying, considering every other platform printed
+        // the string with the explicit cast to char* below.
+        cout << (char *) toWrite;
     }
 
 private:
diff --git a/samples/SAXPrint/SAXPrintHandlers.cpp b/samples/SAXPrint/SAXPrintHandlers.cpp
index f496827de07c641692523dfff9134a9e40179ed5..5749e8a28f44f8c4a388ab0e758a9839318b0978 100644
--- a/samples/SAXPrint/SAXPrintHandlers.cpp
+++ b/samples/SAXPrint/SAXPrintHandlers.cpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.9  2000/05/31 23:58:19  rahulj
+ * Needed an explicit char* cast to get it working under Solaris.
+ *
  * Revision 1.8  2000/04/07 23:25:53  roddey
  * A couple more tweaks of the event handler output.
  *
@@ -162,7 +165,12 @@ SAXPrintHandlers::~SAXPrintHandlers()
 void SAXPrintHandlers::writeChars(const XMLByte* const toWrite)
 {
     // For this one, just dump them to the standard output
-    cout << toWrite;
+    // Surprisingly, Solaris was the only platform on which
+    // required the char* cast to print out the string correctly.
+    // Without the cast, it was printing the pointer value in hex.
+    // Quite annoying, considering every other platform printed
+    // the string with the explicit cast to char* below.
+    cout << (char *) toWrite;
 }