X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fbasis%2Futf_conversion.h;h=084ae496c9fce47fb6951c8f279ffb69c7928468;hb=2dfef98831f239ef7448290fb7569a676f2a8907;hp=33d436eb6010a0c45a31a4010a623d6442b89862;hpb=457b128b77b5b4a0b7dd3094de543de2ce1477ad;p=feisty_meow.git diff --git a/nucleus/library/basis/utf_conversion.h b/nucleus/library/basis/utf_conversion.h index 33d436eb..084ae496 100644 --- a/nucleus/library/basis/utf_conversion.h +++ b/nucleus/library/basis/utf_conversion.h @@ -190,6 +190,7 @@ Booleano isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); // compliant functions that required Unicode in win32 but not in Unix systems. #if defined(UNICODE) +#error should not be in here right now --cak ///holding to test wx && defined(__WIN32__) //! to_unicode_temp() converts to UTF-16 as needed for win32 system calls. /*! this conversion is only appropriate to use within expressions. it does @@ -216,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 ////////////// @@ -308,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;