- TECObjectRef converter ;
- TextEncodingBase code = wxMacGetSystemEncFromFontEnc( enc ) ;
- TextEncodingBase unicode = CreateTextEncoding(kTextEncodingUnicodeDefault,0,kUnicode16BitFormat) ;
- OSStatus status = TECCreateConverter(&converter,code,unicode);
- char s[2] ;
- s[1] = 0 ;
- ByteCount byteInLen, byteOutLen ;
+ // create
+ CFStringEncoding cfencoding = wxMacGetSystemEncFromFontEnc( enc ) ;
+ if( !CFStringIsEncodingAvailable( cfencoding ) )
+ return NULL;
+
+ memset( gMacEncodings[i] , 0 , 128 * 2 );
+ char s[2] = { 0 , 0 };
+ CFRange firstchar = CFRangeMake( 0, 1 );