Merge branch 'release-2.140.136'
[feisty_meow.git] / nucleus / library / basis / utf_conversion.h
index dcb8b16bf5d01d549c4595a3424ce4b659564eed..084ae496c9fce47fb6951c8f279ffb69c7928468 100644 (file)
@@ -217,10 +217,10 @@ Booleano isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd);
   #define from_unicode_persist(name, s) null_transcoder name(s, true) 
 #endif
 
-#ifdef _MSC_VER
-  //! sends UTF-8 information to the diagnostic view in the IDE.
-  #define TRACE_PRINT(s) TRACE(_T("%s"), to_unicode_temp(s))
-#endif
+//#ifdef _MSC_VER
+//  //! sends UTF-8 information to the diagnostic view in the IDE.
+//  #define TRACE_PRINT(s) TRACE(_T("%s"), to_unicode_temp(s))
+//#endif
 
 //////////////
 
@@ -309,13 +309,16 @@ public:
   null_transcoder(const astring &utf8_input, bool make_own_copy);
   ~null_transcoder() {
     if (_make_own_copy) delete [] _converted;
-    _converted = NIL;
+    _converted = NULL_POINTER;
   }
 
   int length() const;
   operator char * () { return (char *)_converted; }
   operator const char * () const { return (const char *)_converted; }
 
+  operator astring() const { return astring((const char *)_converted); }
+    //!< converts the char pointer into an astring object.
+
 private:
   bool _make_own_copy;
   const UTF8 *_converted;