if (format == wxDF_UNICODETEXT)
{
// host native is UTF16
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
return converter.WC2MB( NULL , GetText().c_str() , 0 ) + 2; // add space for trailing unichar 0
}
else // == wxDF_TEXT
if (format == wxDF_UNICODETEXT)
{
// host native is UTF16
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
size_t len = converter.WC2MB( NULL , GetText().c_str() , 0 ) ;
wxCharBuffer buffer = converter.cWX2MB( GetText().c_str() );
memcpy( (char*) buf, (const char*) buffer , len + 2); // trailing unichar 0
if (format == wxDF_UNICODETEXT)
{
// host native is UTF16
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
SetText( converter.cMB2WX( (const char*) buf ) );
}
else
UniChar* szUniBuffer = (UniChar*) szUnConv;
#if SIZEOF_WCHAR_T == 4
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
nBufSize = converter.WC2MB( NULL , szUnConv , 0 );
szUniBuffer = new UniChar[ (nBufSize / sizeof(UniChar)) + 1] ;
converter.WC2MB( (char*) szUniBuffer , szUnConv, nBufSize + sizeof(UniChar)) ;
// we have to terminate here, because n might be larger for the trailing zero, and if UniChar
// is not properly terminated we get random characters at the end
ubuf[byteOutLen / sizeof( UniChar ) ] = 0 ;
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
res = converter.MB2WC( (buf ? buf : tbuf) , (const char*)ubuf , n ) ;
free( ubuf ) ;
#else
ByteCount byteBufferLen = n ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
size_t unicharlen = converter.WC2MB( NULL , psz , 0 ) ;
byteInLen = unicharlen ;
ubuf = (UniChar*) malloc( byteInLen + 2 ) ;
UniCharCount chars = str.Length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
#if wxUSE_UNICODE
size_t unicharlen = converter.WC2MB( NULL , str.wc_str() , 0 ) ;
ubuf = (UniChar*) malloc( unicharlen + 2 ) ;
UniCharCount chars = str.Length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
#if wxUSE_UNICODE
size_t unicharlen = converter.WC2MB( NULL , str.wc_str() , 0 ) ;
ubuf = (UniChar*) malloc( unicharlen + 2 ) ;
UniCharCount chars = str.Length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
#if wxUSE_UNICODE
size_t unicharlen = converter.WC2MB( NULL , str.wc_str() , 0 ) ;
ubuf = (UniChar*) malloc( unicharlen + 2 ) ;
UniCharCount chars = text.Length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
#if wxUSE_UNICODE
size_t unicharlen = converter.WC2MB( NULL , text.wc_str() , 0 ) ;
ubuf = (UniChar*) malloc( unicharlen + 2 ) ;
SetHandleSize( theText , ( actualSize + 1 ) * sizeof( UniChar ) ) ;
HLock( theText ) ;
(((UniChar*)*theText)[actualSize]) = 0 ;
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
size_t noChars = converter.MB2WC( NULL , (const char*)*theText , 0 ) ;
ptr = new wxChar[noChars + 1] ;
TXNSetData( m_txn , kTXNUnicodeTextData, (void*)st.wc_str(), len * 2,
start, end);
#else
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
ByteCount byteBufferLen = converter.WC2MB( NULL , st.wc_str() , 0 ) ;
UniChar *unibuf = (UniChar*) malloc(byteBufferLen) ;
converter.WC2MB( (char*) unibuf , st.wc_str() , byteBufferLen ) ;
#if SIZEOF_WCHAR_T == 2
uniChar = charBuf[0] ;
#else
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
converter.MB2WC( &uniChar , (const char*)charBuf , 1 ) ;
#endif
if ( dataSize > 4 )
m_cfs = CFStringCreateWithCharacters( kCFAllocatorDefault,
(UniChar*)str.wc_str() , str.Len() );
#else
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
size_t unicharlen = converter.WC2MB( NULL , str.wc_str() , 0 ) ;
UniChar *unibuf = new UniChar[ unicharlen / sizeof(UniChar) + 1 ] ;
converter.WC2MB( (char*)unibuf , str.wc_str() , unicharlen ) ;
UniChar* unibuf = new UniChar[ cflen + 1 ] ;
CFStringGetCharacters( m_cfs , CFRangeMake( 0 , cflen ) , (UniChar*) unibuf ) ;
unibuf[cflen] = 0 ;
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
noChars = converter.MB2WC( NULL , (const char*)unibuf , 0 ) ;
buf = new wxChar[ noChars + 1 ] ;
converter.MB2WC( buf , (const char*)unibuf , noChars ) ;