Commits

Simon Wilper  committed 7d3824c

toolsfixes: created the helper functions toUpperASCII and EraseAllChars

  • Participants
  • Parent commits 80667c7

Comments (0)

Files changed (2)

File l10ntools/inc/export.hxx

 #include <set>      /* std::set*/
 #include <vector>   /* std::vector*/
 #include <queue>    
-#include <string>
+#include <string>       /* std::string */
+#include <sstream> /* std::stringstream */
+#include <cctype> /* toupper() */
 
 #include <unistd.h>
 #ifdef WNT
 
 #define JAPANESE_ISO "ja"
 
+/** Iterates over a std::string and removes all characters c returning
+ * the cleaned up version.
+ *
+ * @param str the string to be processed
+ * @param c the character that shall be removed
+ * @returns the string with the specified character removed
+ */
+std::string EraseAllChars( std::string str, char c ) {
+    std::string::iterator i = str.begin();
+    std::stringstream buffer;
+	while ( i != str.end() ) {
+		if ( *i != c ) buffer << *i;
+		i++;
+	}
+
+	return buffer.str();
+}
+
+/** Converts a std::string to uppercase
+ *
+ * @param str the source string to process
+ * @returns the uppercase string
+ */
+std::string ToUpperAscii( std::string str ) {
+    std::string::iterator i = str.begin();
+    std::stringstream buffer;
+	while ( i != str.end() ) {
+        char c = *i;
+		if ( isascii( c ) && isalpha( c ) && islower( c ) )
+            buffer << (char)toupper(c);
+        else
+            buffer << c;
+		i++;
+	}
+
+	return buffer.str();
+}
 
 struct eqstr{
   BOOL operator()(const char* s1, const char* s2) const{
   }
 };
 
-struct equalByteString{
-        bool operator()( const ByteString& rKey1, const ByteString& rKey2 ) const {
-            return rKey1.CompareTo( rKey2 )==COMPARE_EQUAL;
+struct equalstring{
+        bool operator()( const std::string& rKey1, const std::string& rKey2 ) const {
+            return rKey1 == rKey2; //rKey1.CompareTo( rKey2 )==COMPARE_EQUAL;
     }
 };
-struct lessByteString{
-        bool operator()( const ByteString& rKey1, const ByteString& rKey2 ) const {
-            return rKey1.CompareTo( rKey2 )==COMPARE_LESS;
+struct lessstring{
+        bool operator()( const std::string& rKey1, const std::string& rKey2 ) const {
+            return rKey1 < rKey2; //rKey1.CompareTo( rKey2 )==COMPARE_LESS;
     }
 };
 
-struct hashByteString{
-    size_t operator()( const ByteString& rName ) const{
+struct hashstring{
+    size_t operator()( const std::string& rName ) const{
                 std::hash< const char* > myHash;
-                return myHash( rName.GetBuffer() );
+                return myHash( rName.c_str() );
     }
 };
 
 class PFormEntrys;
 class MergeData;
-typedef std::set<ByteString , lessByteString > ByteStringSet;
 
-typedef std::hash_map<ByteString , ByteString , hashByteString,equalByteString>
-                                ByteStringHashMap;
+typedef std::set<std::string , lessstring >
+	stringSet;
 
-typedef std::hash_map<ByteString , bool , hashByteString,equalByteString>
-                                ByteStringBoolHashMap;
+typedef std::hash_map<std::string , std::string , hashstring , equalstring>
+	stringHashMap;
 
-typedef std::hash_map<ByteString , PFormEntrys* , hashByteString,equalByteString>
-                                PFormEntrysHashMap;
+typedef std::hash_map<std::string , bool , hashstring , equalstring>
+	stringBoolHashMap;
 
-typedef std::hash_map<ByteString , MergeData* , hashByteString,equalByteString>
-                                MergeDataHashMap;
+typedef std::hash_map<std::string , PFormEntrys* , hashstring , equalstring>
+	PFormEntrysHashMap;
 
-#define SOURCE_LANGUAGE ByteString("en-US")
+typedef std::hash_map<std::string , MergeData* , hashstring , equalstring>
+	MergeDataHashMap;
+
+#define SOURCE_LANGUAGE std::string("en-US")
 #define LIST_REFID  "LIST_REFID"
 
-typedef ByteStringHashMap ExportListEntry;
+typedef stringHashMap ExportListEntry;
 
 DECLARE_LIST( ExportListBase, ExportListEntry * )
 
 {
 public:
 	~ResData();
-	BOOL SetId( const ByteString &rId, USHORT nLevel );
+	BOOL SetId( const std::string &rId, USHORT nLevel );
     
     USHORT nWidth;
 	USHORT nChildIndex;
 
 	BOOL bRestMerged;
 
-    ByteString sResTyp;
-	ByteString sId;
-	ByteString sGId;
-	ByteString sHelpId;
-	ByteString sFilename;
+    std::string sResTyp;
+    std::string sId;
+    std::string sGId;
+    std::string sHelpId;
+    std::string sFilename;
 
-    ByteStringHashMap sText;
-    USHORT nTextRefId;
+	stringHashMap sText;
+	USHORT nTextRefId;
 
-	ByteStringHashMap sHelpText;
+	stringHashMap sHelpText;
     USHORT nHelpTextRefId;
 
-	ByteStringHashMap sQuickHelpText;
+	stringHashMap sQuickHelpText;
     USHORT nQuickHelpTextRefId;
 
-	ByteStringHashMap sTitle;
+	stringHashMap sTitle;
     USHORT nTitleRefId;
 
-	ByteString sTextTyp;
-	ByteStringHashMap aFallbackData;
-	ByteStringHashMap aMergedLanguages;
+	std::string sTextTyp;
+	stringHashMap aFallbackData;
+	stringHashMap aMergedLanguages;
 
 	ExportList	*pStringList;
 	ExportList	*pUIEntries;
     ExportList	*pFilterList;
     ExportList  *pPairedList;
  
-    ByteString sPForm;
+	std::string sPForm;
 
 	void Dump();
-	void addFallbackData( ByteString& sId , const ByteString& sText );
-	bool getFallbackData( ByteString& sId , ByteString& sText);
+	void addFallbackData( std::string& sId , const std::string& sText );
+	bool getFallbackData( std::string& sId , std::string& sText);
 	
-	void addMergedLanguage( ByteString& sLang );
-	bool isMerged( ByteString& sLang );
-	ResData( const ByteString &rPF, const ByteString &rGId )
+	void addMergedLanguage( std::string& sLang );
+	bool isMerged( std::string& sLang );
+	ResData( const std::string &rPF, const std::string &rGId )
 			: 
             nWidth( 0 ),
             nChildIndex( 0 ),
             pPairedList( NULL ),
             sPForm( rPF )
 	{
-		sGId.EraseAllChars( '\r' );
-		sPForm.EraseAllChars( '\r' );
+		sGId = EraseAllChars( sGId, '\r' );
+		sPForm = EraseAllChars( sPForm, '\r' );
 	};
-	ResData( const ByteString &rPF, const ByteString &rGId , const ByteString &rFilename )
+	ResData( const std::string &rPF, const std::string &rGId , const std::string &rFilename )
 			: 			
             nChildIndex( 0 ),
             nIdLevel( ID_LEVEL_NULL ),
             sPForm( rPF )
 
 	{
-		sGId.EraseAllChars( '\r' );
-		sPForm.EraseAllChars( '\r' );
+		sGId = EraseAllChars( sGId, '\r' );
+		sPForm = EraseAllChars( sPForm, '\r' );
 	};
 
 
     
 	ResStack aResStack;					// stack for parsing recursive
 
-	ByteString sActPForm;				// hold cur. system
+	std::string sActPForm;				// hold cur. system
 
 	BOOL bDefine;						// cur. res. in a define?
 	BOOL bNextMustBeDefineEOL;			// define but no \ at lineend
 	ULONG nLevel;						// res. recursiv? how deep?
 	USHORT nList;						// cur. res. is String- or FilterList
-    ByteString nListLang;
+    std::string nListLang;
     ULONG nListIndex;
 	ULONG nListLevel;
     bool bSkipFile;
-	ByteString sProject;
-	ByteString sRoot;
+	std::string sProject;
+	std::string sRoot;
 	BOOL bEnableExport;
 	BOOL bMergeMode;
-	ByteString sMergeSrc;
-	ByteString sLastListLine;
+	std::string sMergeSrc;
+	std::string sLastListLine;
 	BOOL bError;						// any errors while export?
 	BOOL bReadOver;
 	BOOL bDontWriteOutput;
-	ByteString sLastTextTyp;
+	std::string sLastTextTyp;
     static bool isInitialized;
-	ByteString sFilename;
+	std::string sFilename;
     
 
 public:
 	ParserQueue* pParseQueue; // public ?
-    static ByteString sLanguages; // public ?
-    static ByteString sForcedLanguages; // public ?
+    static std::string sLanguages; // public ?
+    static std::string sForcedLanguages; // public ?
 	
     
-    static bool skipProject( ByteString sPrj ) ;
+    static bool skipProject( std::string sPrj ) ;
 	static void InitLanguages( bool bMergeMode = false );
     static void InitForcedLanguages( bool bMergeMode = false );
-    static std::vector<ByteString> GetLanguages();
-    static std::vector<ByteString> GetForcedLanguages();
+    static std::vector<std::string> GetLanguages();
+    static std::vector<std::string> GetForcedLanguages();
 
-    static void SetLanguages( std::vector<ByteString> val );
-    static void RemoveUTF8ByteOrderMarker( ByteString &rString );
-    static bool hasUTF8ByteOrderMarker( const ByteString &rString );
-    static void RemoveUTF8ByteOrderMarkerFromFile( const ByteString &rFilename );
-    static bool fileHasUTF8ByteOrderMarker( const ByteString &rString ); 
-	static ByteString GetIsoLangByIndex( USHORT nIndex );
-	static void QuotHTML( ByteString &rString );
-    static bool CopyFile( const ByteString& source , const ByteString& dest );
+    static void SetLanguages( std::vector<std::string> val );
+    static void RemoveUTF8ByteOrderMarker( std::string &rString );
+    static bool hasUTF8ByteOrderMarker( const std::string &rString );
+    static void RemoveUTF8ByteOrderMarkerFromFile( const std::string &rFilename );
+    static bool fileHasUTF8ByteOrderMarker( const std::string &rString ); 
+	static std::string GetIsoLangByIndex( USHORT nIndex );
+	static void QuotHTML( std::string &rString );
+    static bool CopyFile( const std::string& source , const std::string& dest );
 
-	static void QuotHTMLXRM( ByteString &rString );
-    static void UnquotHTML( ByteString &rString );
+	static void QuotHTMLXRM( std::string &rString );
+    static void UnquotHTML( std::string &rString );
 	
     static const char* GetEnv( const char *pVar );
 	static int getCurrentDirectory( rtl::OUString& base_fqurl , rtl::OUString& base );
 
-    static bool isSourceLanguage( const ByteString &sLanguage );
-	static bool isAllowed( const ByteString &sLanguage );	
+    static bool isSourceLanguage( const std::string &sLanguage );
+	static bool isAllowed( const std::string &sLanguage );	
 
-    static bool LanguageAllowed( const ByteString &nLanguage );
-    static void Languages( std::vector<ByteString>::const_iterator& begin , std::vector<ByteString>::const_iterator& end );
-	static void getRandomName( const ByteString& sPrefix , ByteString& sRandStr , const ByteString& sPostfix  );
-    static void getRandomName( ByteString& sRandStr );
+    static bool LanguageAllowed( const std::string &nLanguage );
+    static void Languages( std::vector<std::string>::const_iterator& begin , std::vector<std::string>::const_iterator& end );
+	static void getRandomName( const std::string& sPrefix , std::string& sRandStr , const std::string& sPostfix  );
+    static void getRandomName( std::string& sRandStr );
     static void getCurrentDir( std::string& dir );
 
-    static void replaceEncoding( ByteString& rString );
+    static void replaceEncoding( std::string& rString );
     
-	static ByteString GetFallbackLanguage( const ByteString nLanguage );
+	static std::string GetFallbackLanguage( const std::string nLanguage );
 	static void FillInFallbacks( ResData *pResData );
-    static void FillInListFallbacks( ExportList *pList, const ByteString &nSource, const ByteString &nFallback );
-    static ByteString GetTimeStamp();
-	static BOOL ConvertLineEnds( ByteString sSource, ByteString sDestination );
-	static ByteString GetNativeFile( ByteString sSource );
+    static void FillInListFallbacks( ExportList *pList, const std::string &nSource, const std::string &nFallback );
+    static std::string GetTimeStamp();
+	static BOOL ConvertLineEnds( std::string sSource, std::string sDestination );
+	static std::string GetNativeFile( std::string sSource );
 	static DirEntry GetTempFile();
 	
-	static void DumpExportList( ByteString& sListName , ExportList& aList );
-	static ByteString DumpMap( ByteString& sMapName , ByteStringHashMap& aMap );
+	static void DumpExportList( std::string& sListName , ExportList& aList );
+	static std::string DumpMap( std::string& sMapName , stringHashMap& aMap );
 
 private:
-    static std::vector<ByteString> aLanguages;
-    static std::vector<ByteString> aForcedLanguages;
+    static std::vector<std::string> aLanguages;
+    static std::vector<std::string> aForcedLanguages;
 
 	BOOL ListExists( ResData *pResData, USHORT nLst );
 
 	BOOL WriteData( ResData *pResData, BOOL bCreateNew = FALSE );// called befor dest. cur ResData
 	BOOL WriteExportList( ResData *pResData, ExportList *pExportList,
-						const ByteString &rTyp, BOOL bCreateNew = FALSE );
+						const std::string &rTyp, BOOL bCreateNew = FALSE );
 	
-	ByteString MergePairedList( ByteString& sLine , ByteString& sText );
+	std::string MergePairedList( std::string& sLine , std::string& sText );
 
-	ByteString FullId();					// creates cur. GID
+	std::string FullId();					// creates cur. GID
     
-	bool PairedListFallback( ByteString& sText , ResData& aResData );
+	bool PairedListFallback( std::string& sText , ResData& aResData );
     
-	ByteString GetPairedListID		( const ByteString& sText );
-    ByteString GetPairedListString	( const ByteString& sText );
-	ByteString StripList	( const ByteString& sText );
+	std::string GetPairedListID		( const std::string& sText );
+	std::string GetPairedListString	( const std::string& sText );
+	std::string StripList	( const std::string& sText );
 
-	void UnmergeUTF8( ByteString& sOrig );
-	void InsertListEntry( const ByteString &rText, const ByteString &rLine );
-	void CleanValue( ByteString &rValue );
-	ByteString GetText( const ByteString &rSource, int nToken );
+	void UnmergeUTF8( std::string& sOrig );
+	void InsertListEntry( const std::string &rText, const std::string &rLine );
+	void CleanValue( std::string &rValue );
+	std::string GetText( const std::string &rSource, int nToken );
 
-	BOOL PrepareTextToMerge( ByteString &rText, USHORT nTyp,
-		ByteString &nLangIndex, ResData *pResData );		
+	BOOL PrepareTextToMerge( std::string &rText, USHORT nTyp,
+		std::string &nLangIndex, ResData *pResData );		
 
 	void MergeRest( ResData *pResData, USHORT nMode = MERGE_MODE_NORMAL );
-	void ConvertMergeContent( ByteString &rText );
+	void ConvertMergeContent( std::string &rText );
 
-  	void WriteToMerged( const ByteString &rText , bool bSDFContent );
+  	void WriteToMerged( const std::string &rText , bool bSDFContent );
 	void SetChildWithText();
 
-	void CutComment( ByteString &rText );
+	void CutComment( std::string &rText );
 
 public:
-	Export( const ByteString &rOutput, BOOL bWrite,
-			const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile );
-	Export( const ByteString &rOutput, BOOL bWrite,
-			const ByteString &rPrj, const ByteString &rPrjRoot,
-			const ByteString &rMergeSource , const ByteString& rFile );
+	Export( const std::string &rOutput, BOOL bWrite,
+			const std::string &rPrj, const std::string &rPrjRoot , const std::string& rFile );
+	Export( const std::string &rOutput, BOOL bWrite,
+			const std::string &rPrj, const std::string &rPrjRoot,
+			const std::string &rMergeSource , const std::string& rFile );
 	~Export();
 
 	void Init();
 * Purpose: holds information of data to merge (one pform)
 ******************************************************************************/
 
-class PFormEntrys : public ByteString
+class PFormEntrys : public std::string
 {
 friend class MergeDataFile;
 private:
-	ByteString sHelpText; // empty string
-	ByteStringHashMap sText;
-	ByteStringBoolHashMap bTextFirst;
-	ByteStringHashMap sQuickHelpText;
-	ByteStringBoolHashMap bQuickHelpTextFirst;
-	ByteStringHashMap sTitle;
-	ByteStringBoolHashMap bTitleFirst;
+	std::string sHelpText;
+	stringHashMap sText;
+	stringBoolHashMap bTextFirst;
+	stringHashMap sQuickHelpText;
+	stringBoolHashMap bQuickHelpTextFirst;
+	stringHashMap sTitle;
+	stringBoolHashMap bTitleFirst;
 
 public:
-	PFormEntrys( const ByteString &rPForm ) : ByteString( rPForm ) {};
-	ByteString Dump();
+	PFormEntrys( const std::string &rPForm ) : std::string( rPForm ) {};
+    std::string Dump();
 	void InsertEntry( 
-                    const ByteString &nId ,
-                    const ByteString &rText,
-					const ByteString &rQuickHelpText,
-					const ByteString &rTitle 
+                    const std::string &nId ,
+                    const std::string &rText,
+					const std::string &rQuickHelpText,
+					const std::string &rTitle 
                     )
 		{
 			
 			sTitle[ nId ] = rTitle;
 			bTitleFirst[ nId ] = true;
 		}
-     BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
-     BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+     BOOL GetText( std::string &rReturn, USHORT nTyp, const std::string &nLangIndex, BOOL bDel = FALSE );
+     BOOL GetTransex3Text( std::string &rReturn, USHORT nTyp, const std::string &nLangIndex, BOOL bDel = FALSE );
 
 };
 
 {
 friend class MergeDataFile;
 private:
-	ByteString sTyp;
-	ByteString sGID;
-	ByteString sLID;
-    ByteString sFilename;
+	std::string sTyp;
+	std::string sGID;
+	std::string sLID;
+    std::string sFilename;
     PFormEntrysHashMap aMap;
 public:
-	MergeData( const ByteString &rTyp, const ByteString &rGID, const ByteString &rLID , const ByteString &rFilename )
+	MergeData( const std::string &rTyp, const std::string &rGID, const std::string &rLID , const std::string &rFilename )
 			: sTyp( rTyp ), sGID( rGID ), sLID( rLID ) , sFilename( rFilename ) {};
 	~MergeData();
-	PFormEntrys* InsertEntry( const ByteString &rPForm );
+	PFormEntrys* InsertEntry( const std::string &rPForm );
 	PFormEntrys* GetPFormEntrys( ResData *pResData );
     
-    void Insert( const ByteString& rPFO , PFormEntrys* pfEntrys );
-    PFormEntrys* GetPFObject( const ByteString& rPFO );
+    void Insert( const std::string& rPFO , PFormEntrys* pfEntrys );
+    PFormEntrys* GetPFObject( const std::string& rPFO );
 
-	ByteString Dump();
+	std::string Dump();
 	BOOL operator==( ResData *pData );
 };
 
 {
 private:
 	BOOL bErrorLog;
-	ByteString sErrorLog;
+	std::string sErrorLog;
 	SvFileStream aErrLog;
-    ByteStringSet aLanguageSet;
+    stringSet aLanguageSet;
     MergeDataHashMap aMap;  
-    ByteStringHashMap aLanguageMap;
-    std::vector<ByteString> aLanguageList;
-    ByteStringHashMap aFilenames;
+    stringHashMap aLanguageMap;
+    std::vector<std::string> aLanguageList;
+    stringHashMap aFilenames;
     
 
 public:
-    MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
+    MergeDataFile( const std::string &rFileName, const std::string& rFile , BOOL bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
 	~MergeDataFile();
     
     
-	std::vector<ByteString> GetLanguages();
+	std::vector<std::string> GetLanguages();
 	MergeData *GetMergeData( ResData *pResData , bool bCaseSensitve = false );
 	
     PFormEntrys *GetPFormEntrys( ResData *pResData );
     PFormEntrys *GetPFormEntrysCaseSensitive( ResData *pResData );
 
-	void InsertEntry( const ByteString &rTYP, const ByteString &rGID, const ByteString &rLID,
-				const ByteString &rPFO, 
-                const ByteString &nLang , const ByteString &rTEXT,
-				const ByteString &rQHTEXT, const ByteString &rTITLE , 
-                const ByteString &sFilename , bool bCaseSensitive 
+	void InsertEntry( const std::string &rTYP, const std::string &rGID, const std::string &rLID,
+				const std::string &rPFO, 
+                const std::string &nLang , const std::string &rTEXT,
+				const std::string &rQHTEXT, const std::string &rTITLE , 
+                const std::string &sFilename , bool bCaseSensitive 
 				);
 	static USHORT GetLangIndex( USHORT nId );
-	static ByteString CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive = false );
+	static std::string CreateKey( const std::string& rTYP , const std::string& rGID , const std::string& rLID , const std::string& rFilename , bool bCaseSensitive = false );
 
-	ByteString Dump();
-	void WriteError( const ByteString &rLine );
+	std::string Dump();
+	void WriteError( const std::string &rLine );
 };
 
 
 class QueueEntry
 {
 public:
-    QueueEntry( int nTypVal , ByteString sLineVal ): nTyp( nTypVal ) , sLine( sLineVal ){};
+    QueueEntry( int nTypVal , std::string sLineVal ): nTyp( nTypVal ) , sLine( sLineVal ){};
     int nTyp;
-    ByteString sLine;
+    std::string sLine;
 };
 
 class ParserQueue

File l10ntools/source/export.cxx

 #include "tokens.h"
 #include "utf8conv.hxx"
 #include <iostream>
+#include <string>
+
+using namespace std;
 
 extern "C" { int yyerror( char * ); }
 extern "C" { int YYWarning( char * ); }
 #define STATE_LANGUAGES	0X000B
 
 // set of global variables
-DECLARE_LIST( FileList, ByteString * )
+DECLARE_LIST( FileList, string* )
 FileList aInputFileList;
 BOOL bEnableExport;
 BOOL bMergeMode;
 BOOL bBreakWhenHelpText;
 BOOL bUnmerge;
 BOOL bUTF8;
-ByteString sPrj;
-ByteString sPrjRoot;
-ByteString sActFileName;
-ByteString sOutputFile;
-ByteString sMergeSrc;
-ByteString sTempFile;
-ByteString sFile;
+string sPrj;
+string sPrjRoot;
+string sActFileName;
+string sOutputFile;
+string sMergeSrc;
+string sTempFile;
+string sFile;
 MergeDataFile *pMergeDataFile;
 FILE *pTempFile;
 
 
-ByteString sStrBuffer;
+string sStrBuffer;
 bool bMarcro = false;
 
 extern "C" {
 
 	// parse command line
 	for( int i = 1; i < argc; i++ ) {
-		ByteString sSwitch( argv[ i ] );
+		string sSwitch( argv[ i ] );
         
         if (sSwitch == "-i"  || sSwitch == "-I" ) {
 			nState = STATE_INPUT; // next tokens specifies source files
 			bUnmerge = TRUE;
 			bMergeMode = TRUE;
 		}
-		else if ( sSwitch.ToUpperAscii() == "-UTF8" ) {
+		else if ( ToUpperAscii(sSwitch) == "-UTF8" ) {
 			nState = STATE_UTF8;
 			bUTF8 = TRUE;
 		}
-		else if ( sSwitch.ToUpperAscii() == "-NOUTF8" ) {
+		else if ( ToUpperAscii(sSwitch) == "-NOUTF8" ) {
 			nState = STATE_UTF8;
 			bUTF8 = FALSE;
 		}
 					return NULL;	// no valid command line
 				}
 				case STATE_INPUT: {
-					aInputFileList.Insert( new ByteString( argv[ i ]), LIST_APPEND );
+					aInputFileList.Insert( new string( argv[ i ]), LIST_APPEND );
 					bInput = TRUE; // min. one source file found
 				}
 				break;
 				case STATE_OUTPUT: {
-					sOutputFile = ByteString( argv[ i ]); // the dest. file
+					sOutputFile = string( argv[ i ]); // the dest. file
 				}
 				break;
 				case STATE_PRJ: {
-					sPrj = ByteString( argv[ i ]);
+					sPrj = string( argv[ i ]);
 				}
 				break;
 				case STATE_ROOT: {
-					sPrjRoot = ByteString( argv[ i ]); // path to project root
+					sPrjRoot = string( argv[ i ]); // path to project root
 				}
 				break;
 				case STATE_MERGESRC: {
-					sMergeSrc = ByteString( argv[ i ]);
+					sMergeSrc = string( argv[ i ]);
 					bMergeMode = TRUE; // activate merge mode, cause merge database found
 				}
 				break;
 				case STATE_LANGUAGES: {
-					Export::sLanguages = ByteString( argv[ i ]);
+					Export::sLanguages = string( argv[ i ]);
 				}
 				break;
 			}
 		}
 	}
-    if( bUnmerge ) sMergeSrc = ByteString();
+    if( bUnmerge ) sMergeSrc = string();
 	if ( bInput ) {
 		// command line is valid
 		bEnableExport = TRUE;
-		char *pReturn = new char[ sOutputFile.Len() + 1 ];
-		strcpy( pReturn, sOutputFile.GetBuffer());  // #100211# - checked
+
+		char *pReturn = new char[ sOutputFile.size() + 1 ];
+		strcpy( pReturn, sOutputFile.c_str());  // #100211# - checked
 		return pReturn;
+
 	}
 
 	// command line is not valid
 /*****************************************************************************/
 {
 	// instanciate Export
-	ByteString sOutput( pOutput );
-    ByteString sFilename( pFilename );
+	string sOutput( pOutput );
+    string sFilename( pFilename );
 
 	if ( bMergeMode && !bUnmerge ) {
 		// merge mode enabled, so read database
 
 extern const char* getFilename()
 {
-	return (*(aInputFileList.GetObject( 0 ))).GetBuffer();
+	return (*(aInputFileList.GetObject( 0 ))).c_str();
 }
 /*****************************************************************************/
 extern FILE *GetNextFile()
 /*****************************************************************************/
 {
 	// look for next valid filename in input file list
-	if ( sTempFile.Len()) {
+	if ( sTempFile.size()) {
 		fclose( pTempFile );
 		String sTemp( sTempFile, RTL_TEXTENCODING_ASCII_US );
 		DirEntry aTemp( sTemp );
 	}
 
 	while ( aInputFileList.Count()) {
-		ByteString sFileName( *(aInputFileList.GetObject( 0 )));
+		string sFileName( *(aInputFileList.GetObject( 0 )));
 
-		ByteString sOrigFile( sFileName );
+		string sOrigFile( sFileName );
 
 		sFileName = Export::GetNativeFile( sFileName );
 		delete aInputFileList.GetObject(( ULONG ) 0 );
 			// create path to project root
 			DirEntry aEntry( String( sOrigFile, RTL_TEXTENCODING_ASCII_US ));
 			aEntry.ToAbs();
-			ByteString sFullEntry( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
+			string sFullEntry( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
 			aEntry += DirEntry( String( "..", RTL_TEXTENCODING_ASCII_US ));
 			aEntry += DirEntry( sPrjRoot );
-			ByteString sPrjEntry( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
+			string sPrjEntry( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
 
 			// create file name, beginnig with project root
 			// (e.g.: source\ui\src\menue.src)
 /*****************************************************************************/
 {
 
-    pExport->pParseQueue->Push( QueueEntry( nTyp , ByteString( pTokenText ) ) );
+    pExport->pParseQueue->Push( QueueEntry( nTyp , string( pTokenText ) ) );
     return 1;
 }
 
 	printf("sPForm = %s , sResTyp = %s , sId = %s , sGId = %s , sHelpId = %s\n",sPForm.GetBuffer()
 		,sResTyp.GetBuffer(),sId.GetBuffer(),sGId.GetBuffer(),sHelpId.GetBuffer());
 
-	ByteString a("*pStringList");
-	ByteString b("*pUIEntries");
-	ByteString c("*pFilterList");
-	ByteString d("*pItemList");
-	ByteString e("*pPairedList");
-	ByteString f("sText");
+	string a("*pStringList");
+	string b("*pUIEntries");
+	string c("*pFilterList");
+	string d("*pItemList");
+	string e("*pPairedList");
+	string f("sText");
 
 	Export::DumpMap( f , sText );
 	
 	printf("\n");
 }
 
-void ResData::addFallbackData( ByteString& sId_in , const ByteString& sText_in ){
+void ResData::addFallbackData( string& sId_in , const string& sText_in ){
 	//printf(" ResData::addFallbackData ( sId = %s , sText = %s )\n", sId_in.GetBuffer() , sText_in.GetBuffer() );
     aFallbackData[ sId_in ] = sText_in;
 }
-bool ResData::getFallbackData( ByteString& sId_in , ByteString& sText_inout ){
+bool ResData::getFallbackData( string& sId_in , string& sText_inout ){
 	sText_inout = aFallbackData[ sId_in ];
 	//printf("ResData::getFallbackData( sId = %s , return sText = %s \n" , sId_in.GetBuffer(), sText_inout.GetBuffer());
     return sText_inout.Len() > 0;
 }
 
-void ResData::addMergedLanguage( ByteString& sLang ){
-	aMergedLanguages[ sLang ]=ByteString("1");
+void ResData::addMergedLanguage( string& sLang ){
+	aMergedLanguages[ sLang ]=string("1");
 }
-bool ResData::isMerged( ByteString& sLang ){
+bool ResData::isMerged( string& sLang ){
 	return aMergedLanguages[ sLang ].Equals("1");
 }
 
 /*****************************************************************************/
-BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
+BOOL ResData::SetId( const string &rId, USHORT nLevel )
 /*****************************************************************************/
 {
 	if ( nLevel > nIdLevel )
 		sId = rId;
 
 		if ( bChild && bChildWithText ) {
-			ByteString sError( "ResId after child definition" );
+			string sError( "ResId after child definition" );
 			yyerror( sError.GetBufferAccess());
 			sError.ReleaseBufferAccess();
 			SetError();
 		}
 
 		if ( sId.Len() > 255 ) {
-			ByteString sWarning( "LocalId > 255 chars, truncating..." );
+			string sWarning( "LocalId > 255 chars, truncating..." );
 			YYWarning( sWarning.GetBufferAccess());
 			sWarning.ReleaseBufferAccess();
 			sId.Erase( 255 );
 //
 
 /*****************************************************************************/
-Export::Export( const ByteString &rOutput, BOOL bWrite,
-				const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile )
+Export::Export( const string &rOutput, BOOL bWrite,
+				const string &rPrj, const string &rPrjRoot , const string& rFile )
 /*****************************************************************************/
 				:
 				pWordTransformer( NULL ),
 }
 
 /*****************************************************************************/
-Export::Export( const ByteString &rOutput, BOOL bWrite,
-				const ByteString &rPrj, const ByteString &rPrjRoot,
-				const ByteString &rMergeSource , const ByteString& rFile )
+Export::Export( const string &rOutput, BOOL bWrite,
+				const string &rPrj, const string &rPrjRoot,
+				const string &rMergeSource , const string& rFile )
 /*****************************************************************************/
 				:
 				pWordTransformer( NULL ),
 	bNextMustBeDefineEOL = FALSE;
 	nLevel = 0;
 	nList = LIST_NON;
-    nListLang = ByteString( String::CreateFromAscii(""),RTL_TEXTENCODING_ASCII_US );
+    nListLang = string( String::CreateFromAscii(""),RTL_TEXTENCODING_ASCII_US );
 	nListIndex = 0;
 	while ( aResStack.Count()) {
 		delete aResStack.GetObject(( ULONG ) 0 );
 /*****************************************************************************/
 {
     
-    ByteString sToken( pToken );
-	ByteString sOrig( sToken );
+    string sToken( pToken );
+	string sOrig( sToken );
 /*	printf("+---------------\n");
 	printf("sToken = %s\n",sToken.GetBuffer());
 	printf("nToken = %d\n",nToken);
     BOOL bWriteToMerged = bMergeMode;
 
 	if ( nToken == CONDITION ) {
-		ByteString sTestToken( pToken );
+		string sTestToken( pToken );
 		sTestToken.EraseAllChars( '\t' );
 		sTestToken.EraseAllChars( ' ' );
 		if (( !bReadOver ) && ( sTestToken.Search( "#ifndef__RSC_PARSER" ) == 0 ))
 			}
 			else if (( nToken != LISTASSIGNMENT ) && ( nToken != UIENTRIES )){
 				// cur. line has macro line end
-				ByteString sTmpLine( sToken );
+				string sTmpLine( sToken );
 				sTmpLine.EraseAllChars( '\t' ); sTmpLine.EraseAllChars( ' ' );
                 #if 0
                 // impossible, unsigned is never negative
 
 			pResData = new ResData( sActPForm, FullId() , sFilename );
 			aResStack.Insert( pResData, LIST_APPEND );
-			ByteString sBackup( sToken );
+			string sBackup( sToken );
 			sToken.EraseAllChars( '\n' );
 			sToken.EraseAllChars( '\r' );
 			sToken.EraseAllChars( '{' );
 			while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
 			sToken.EraseTrailingChars( ' ' );
-			ByteString sT =  sToken.GetToken( 0, ' ' );
+			string sT =  sToken.GetToken( 0, ' ' );
             pResData->sResTyp = sT.ToLowerAscii();
-			ByteString sId( sToken.Copy( pResData->sResTyp.Len() + 1 ));
-			ByteString sCondition;
+			string sId( sToken.Copy( pResData->sResTyp.Len() + 1 ));
+			string sCondition;
 			if ( sId.Search( "#" ) != STRING_NOTFOUND ) {
 				// between ResTyp, Id and paranthes is a precomp. condition
 				sCondition = "#";
 			sId = sId.EraseAllChars( '\t' );
 			pResData->SetId( sId, ID_LEVEL_IDENTIFIER );
 			if ( sCondition.Len()) {
-				ByteString sEmpty( "" );
+				string sEmpty( "" );
 				Execute( CONDITION, sEmpty.GetBufferAccess()); 	// execute the
 														  		// precomp.
 																// condition
 				break;
 
 			bDontWriteOutput = FALSE;
-			ByteString sLowerTyp;
+			string sLowerTyp;
 			if ( pResData )
 				sLowerTyp = "unknown";
 			nLevel++;
         case ASSIGNMENT: {
 			bDontWriteOutput = FALSE;
 			// interpret different types of assignement
- 			ByteString sKey = sToken.GetToken( 0, '=' );
+ 			string sKey = sToken.GetToken( 0, '=' );
 			sKey.EraseAllChars( ' ' );
 			sKey.EraseAllChars( '\t' );
-			ByteString sValue = sToken.GetToken( 1, '=' );
+			string sValue = sToken.GetToken( 1, '=' );
 			CleanValue( sValue );
-			if ( sKey.ToUpperAscii() == "IDENTIFIER" ) {
-				ByteString sId( sValue.EraseAllChars( '\t' ));
+			if ( ToUpperAscii( sKey ) == "IDENTIFIER" ) {
+				string sId( sValue.EraseAllChars( '\t' ));
 				pResData->SetId( sId.EraseAllChars( ' ' ), ID_LEVEL_IDENTIFIER );
 			}
 			else if ( sKey == "HELPID" ) {
 
 				pResData->bList = TRUE;
 				nList = LIST_STRING;
-                //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
+                //string sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
                 nListLang = SOURCE_LANGUAGE;
 				nListIndex = 0;
 				nListLevel = 0;
 				//}
 				pResData->bList = TRUE;
 				nList = LIST_FILTER;
-                //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
+                //string sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
 				nListLang = SOURCE_LANGUAGE;
 				nListIndex = 0;
 				nListLevel = 0;
 				//	( sOrig.SearchAndReplace( "=", "[ de ] =" ));}
 				pResData->bList = TRUE;
 				nList = LIST_UIENTRIES;
-				//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
+				//string sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
 				nListLang = SOURCE_LANGUAGE;
 				nListIndex = 0;
 				nListLevel = 0;
 		case UIENTRIES:
 		case LISTASSIGNMENT: {
 			bDontWriteOutput = FALSE;
-            ByteString sTmpToken( sToken);
+            string sTmpToken( sToken);
             sTmpToken.EraseAllChars(' ');
             USHORT nPos = 0;
             //nPos = sTmpToken.ToLowerAscii().Search("[de]=");
 				//if ( bUnmerge ){
 				//	( sOrig.SearchAndReplace( "=", "[ de ] =" ));
 				//}
-                ByteString sKey = sTmpToken.Copy( 0 , nPos );
+                string sKey = sTmpToken.Copy( 0 , nPos );
 				sKey.EraseAllChars( ' ' );
 				sKey.EraseAllChars( '\t' );
-				ByteString sValue = sToken.GetToken( 1, '=' );
+				string sValue = sToken.GetToken( 1, '=' );
 				CleanValue( sValue );
-				if ( sKey.ToUpperAscii() ==  "STRINGLIST" ) {
+				if ( ToUpperAscii( sKey ) ==  "STRINGLIST" ) {
 					pResData->bList = TRUE;
 					nList = LIST_STRING;
-					//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
+					//string sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
 					nListLang = SOURCE_LANGUAGE;
 					nListIndex = 0;
 					nListLevel = 0;
 				else if ( sKey == "FILTERLIST" ) {
 					pResData->bList = TRUE;
 					nList = LIST_FILTER;
-					//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
+					//string sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
 					nListLang = SOURCE_LANGUAGE;
 					nListIndex = 0;
 					nListLevel = 0;
                 else if ( sKey ==  "PAIREDLIST" ) {
 					pResData->bList = TRUE;
 					nList = LIST_PAIRED;
-					//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
+					//string sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
 					nListLang = SOURCE_LANGUAGE;
 					nListIndex = 0;
 					nListLevel = 0;
                 else if ( sKey ==  "ITEMLIST" ) {
 					pResData->bList = TRUE;
 					nList = LIST_ITEM;
-					//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
+					//string sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
 					nListLang = SOURCE_LANGUAGE;
 					nListIndex = 0;
 					nListLevel = 0;
 				else if ( sKey ==  "UIENTRIES" ) {
 					pResData->bList = TRUE;
 					nList = LIST_UIENTRIES;
-					//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
+					//string sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
 					nListLang = SOURCE_LANGUAGE;
 					nListIndex = 0;
 					nListLevel = 0;
 			}
 			else {
 				// new res. is a String- or FilterList
-				ByteString sKey = sToken.GetToken( 0, '[' );
+				string sKey = sToken.GetToken( 0, '[' );
 				sKey.EraseAllChars( ' ' );
 				sKey.EraseAllChars( '\t' );
-				if ( sKey.ToUpperAscii() == "STRINGLIST" )
+				if ( ToUpperAscii( sKey ) == "STRINGLIST" )
 					nList = LIST_STRING;
 				else if ( sKey == "FILTERLIST" )
 					nList = LIST_FILTER;
 				else if ( sKey == "UIENTRIES" )
 					nList = LIST_UIENTRIES;
 				if ( nList ) {
-					ByteString sLang=sToken.GetToken( 1, '[' ).GetToken( 0, ']' );
+					string sLang=sToken.GetToken( 1, '[' ).GetToken( 0, ']' );
 					CleanValue( sLang );
                     nListLang = sLang;
                     /*if (( bUnmerge ) && ( !nListLang.EqualsIgnoreCaseAscii("de")) && ( !nListLang.EqualsIgnoreCaseAscii("en-US")))
 			// this is an entry for a String- or FilterList
 			if ( nList ) {
 				SetChildWithText();
-				ByteString sEntry( sToken.GetToken( 1, '\"' ));
+				string sEntry( sToken.GetToken( 1, '\"' ));
 				if ( sToken.GetTokenCount( '\"' ) > 3 )
 					sEntry += "\"";
 				if ( sEntry == "\\\"" )
 				CutComment( sToken );
 
 				// this is a text line!!!
-				ByteString sKey = sToken.GetToken( 0, '=' ).GetToken( 0, '[' );
+				string sKey = sToken.GetToken( 0, '=' ).GetToken( 0, '[' );
 				sKey.EraseAllChars( ' ' );
 				sKey.EraseAllChars( '\t' );
-				ByteString sText( GetText( sToken, nToken ));
+				string sText( GetText( sToken, nToken ));
 				if ( !bMergeMode )
 					sText = sText.Convert( aCharSet, RTL_TEXTENCODING_MS_1252 );
-				ByteString sLang;
+				string sLang;
 				if ( sToken.GetToken( 0, '=' ).Search( "[" ) != STRING_NOTFOUND ) {
  					sLang = sToken.GetToken( 0, '=' ).GetToken( 1, '[' ).GetToken( 0, ']' );
 					CleanValue( sLang );
 				}
-				ByteString nLangIndex = sLang;
-                ByteString sOrigKey = sKey;
+				string nLangIndex = sLang;
+                string sOrigKey = sKey;
 				if ( sText.Len() && sLang.Len() ) {
-					if (( sKey.ToUpperAscii() == "TEXT" ) ||
+					if (( ToUpperAscii( sKey ) == "TEXT" ) ||
 						( sKey == "MESSAGE" ) ||
 						( sKey == "CUSTOMUNITTEXT" ) ||
 						( sKey == "SLOTNAME" ) ||
 						}
 						else {
 							if ( pResData->sText[ nLangIndex ].Len()) {
-								ByteString sError( "Language " );
+								string sError( "Language " );
                                 sError += nLangIndex;
 								sError += " defined twice";
 							}
 						SetChildWithText();
 						pResData->bHelpText = TRUE;
 						if ( bBreakWhenHelpText ) {
-							ByteString sError( "\"HelpText\" found in source\n" );
+							string sError( "\"HelpText\" found in source\n" );
 							YYWarning( sError.GetBufferAccess());
 							sError.ReleaseBufferAccess();
 							SetError();
 							//	pResData->sHelpText[ nLangIndex ] = sText;
 						else {
 							if ( pResData->sHelpText[ nLangIndex ].Len()) {
-								ByteString sError( "Language " );
+								string sError( "Language " );
                                 sError += nLangIndex;
 								sError += " defined twice";
 							}
 							//	pResData->sQuickHelpText[ nLangIndex ] = sText;
 						else {
 							if ( pResData->sQuickHelpText[ nLangIndex ].Len()) {
-								ByteString sError( "Language " );
+								string sError( "Language " );
                                 sError += nLangIndex;
 								sError += " defined twice";
 							}
 							//	pResData->sTitle[ nLangIndex ] = sText;
 						else {
 							if ( pResData->sTitle[ nLangIndex ].Len()) {
-								ByteString sError( "Language " );
+								string sError( "Language " );
                                 sError += nLangIndex;
 								sError += " defined twice";
 							}
 		case NEWTEXTINRES: {
 			bDontWriteOutput = TRUE;
 			// this means something like // ### Achtung : Neuer Text ...
-			/*ByteString sLang( "GERMAN" );
-			ByteString sText = sToken.GetToken( 2, ':' ).GetToken( 0, '*' );
+			/*string sLang( "GERMAN" );
+			string sText = sToken.GetToken( 2, ':' ).GetToken( 0, '*' );
 			CleanValue( sText );
 			if ( sText.Len())
             	pResData->sText[ sLang ] = sText;*/
 			bDontWriteOutput = FALSE;
 			// this is a AppfontMapping, so look if its a definition
 			// of field size
-			ByteString sKey = sToken.GetToken( 0, '=' );
+			string sKey = sToken.GetToken( 0, '=' );
 			sKey.EraseAllChars( ' ' );
 			sKey.EraseAllChars( '\t' );
-			ByteString sMapping = sToken.GetToken( 1, '=' );
+			string sMapping = sToken.GetToken( 1, '=' );
 			sMapping = sMapping.GetToken( 1, '(' );
 			sMapping = sMapping.GetToken( 0, ')' );
 			sMapping.EraseAllChars( ' ' );
 			sMapping.EraseAllChars( '\t' );
-			if ( sKey.ToUpperAscii() == "SIZE" ) {
+			if ( ToUpperAscii( sKey ) == "SIZE" ) {
 				pResData->nWidth = ( USHORT ) sMapping.GetToken( 0, ',' ).ToInt64();
 			}
 			else if ( sKey == "POSSIZE" ) {
 			while( sToken.SearchAndReplace( "\r", " " ) != STRING_NOTFOUND ) {};
 			while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
 			while( sToken.SearchAndReplace( "  ", " " ) != STRING_NOTFOUND ) {};
-			ByteString sCondition = sToken.GetToken( 0, ' ' );
+			string sCondition = sToken.GetToken( 0, ' ' );
 			if ( sCondition == "#ifndef" ) {
 				sActPForm = "!defined ";
 				sActPForm += sToken.GetToken( 1, ' ' );
 			sToken.EraseLeadingChars( ' ' );
 			sToken.EraseTrailingChars( ' ' );
 
-			ByteString sCharset = sToken.GetToken( 1, ' ' );
-			ByteString sSet = sToken.GetToken( 2, ' ' );
-			if (( sCharset.ToUpperAscii() == "CHARSET_IBMPC" ) ||
+			string sCharset = sToken.GetToken( 1, ' ' );
+			string sSet = sToken.GetToken( 2, ' ' );
+			if (( ToUpperAscii( sCharset ) == "CHARSET_IBMPC" ) ||
 				( sCharset == "RTL_TEXTENCODING_IBM_850" ) ||
-				(( sCharset == "CHARSET" ) && ( sSet.ToUpperAscii() == "IBMPC" )))
+				(( sCharset == "CHARSET" ) && ( ToUpperAscii(sSet) == "IBMPC" )))
 			{
 				aCharSet = RTL_TEXTENCODING_IBM_850;
 			}
 			else if (( sCharset == "CHARSET_ANSI" ) ||
 				( sCharset == "RTL_TEXTENCODING_MS_1252" ) ||
-				(( sCharset == "CHARSET" ) && ( sSet.ToUpperAscii() == "ANSI" )))
+				(( sCharset == "CHARSET" ) && ( ToUpperAscii(sSet) == "ANSI" )))
 			{
 				aCharSet = RTL_TEXTENCODING_MS_1252;
 			}
 		break;
 		case TEXTREFID : {
 			bDontWriteOutput = TRUE;
- 			/*ByteString sK = sToken.GetToken( 0, '=' );
-            ByteString sKey = sK.EraseAllChars( '\t' ).EraseAllChars( ' ' );
-			ByteString sT = sToken.GetToken( 1, '=' ).GetToken( 0, ';' );
+ 			/*string sK = sToken.GetToken( 0, '=' );
+            string sKey = sK.EraseAllChars( '\t' ).EraseAllChars( ' ' );
+			string sT = sToken.GetToken( 1, '=' ).GetToken( 0, ';' );
             USHORT nRefId = ( USHORT ) sT.EraseAllChars( '\t' ).EraseAllChars( ' ' ).ToInt32();
 			if (( sKey.ToUpperAscii() == "TEXT" ) ||
 				( sKey == "MESSAGE" ) ||
 }
 
 /*****************************************************************************/
-void Export::CutComment( ByteString &rText )
+void Export::CutComment( string &rText )
 /*****************************************************************************/
 {
 	if ( rText.Search( "//" ) != STRING_NOTFOUND ) {
-		ByteString sWork( rText );
+		string sWork( rText );
 		sWork.SearchAndReplaceAll( "\\\"", "XX" );
 		USHORT i = 0;
 		BOOL bInner = FALSE;
 	}
 }
 
-void Export::UnmergeUTF8( ByteString& sOrig ){
+void Export::UnmergeUTF8( string& sOrig ){
 	USHORT nPos1 = sOrig.Search('\"');
 	USHORT nPos2 = sOrig.SearchBackward('\"');
 	if( nPos1 > 0 && nPos2 > 0 && nPos1 < nPos2){
-		ByteString sPart = sOrig.Copy(nPos1+1 , nPos2-1);
-		ByteString sPartUTF8 = sPart;
+		string sPart = sOrig.Copy(nPos1+1 , nPos2-1);
+		string sPartUTF8 = sPart;
 		sPartUTF8.Convert( RTL_TEXTENCODING_MS_1252 , RTL_TEXTENCODING_UTF8 );
 		sOrig.SearchAndReplace( sPart , sPartUTF8 );
 	}
 	if ( bUnmerge )
 		return TRUE;
 
-/*    ByteStringHashMap::iterator pos3 = pResData->sText.begin();
-    ByteStringHashMap::iterator end3 = pResData->sText.end();
+/*    stringHashMap::iterator pos3 = pResData->sText.begin();
+    stringHashMap::iterator end3 = pResData->sText.end();
     for(;pos3!=end3;++pos3){
         
         printf("[%s]=%s\n", pos3->first.GetBuffer(), pos3->second.GetBuffer() );
     }*/
    	// mandatory to export: en-US 
 	
-     if (( //pResData->sText[ ByteString("de") ].Len() &&
+     if (( //pResData->sText[ string("de") ].Len() &&
         ( pResData->sText[ SOURCE_LANGUAGE ].Len()))
         ||
-        ( //pResData->sHelpText[ ByteString("de") ].Len() &&
+        ( //pResData->sHelpText[ string("de") ].Len() &&
         (  pResData->sHelpText[ SOURCE_LANGUAGE ].Len()))                                                                                                             
         ||
-        ( //pResData->sQuickHelpText[ ByteString("de") ].Len() &&
+        ( //pResData->sQuickHelpText[ string("de") ].Len() &&
         (  pResData->sQuickHelpText[ SOURCE_LANGUAGE ].Len()))
          ||
-        ( //pResData->sTitle[ ByteString("de") ].Len() &&
+        ( //pResData->sTitle[ string("de") ].Len() &&
         (  pResData->sTitle[ SOURCE_LANGUAGE ].Len())))
            
    	{
 		FillInFallbacks( pResData );
 
-		ByteString sGID = pResData->sGId;
-		ByteString sLID;
+		string sGID = pResData->sGId;
+		string sLID;
 		if ( !sGID.Len())
 			sGID = pResData->sId;
 		else
 			sLID = pResData->sId;
 
-		ByteString sXText;
-		ByteString sXHText;
-		ByteString sXQHText;
-		ByteString sXTitle;
+		string sXText;
+		string sXHText;
+		string sXQHText;
+		string sXTitle;
 
-		ByteString sTimeStamp( Export::GetTimeStamp());
-        ByteString sCur;
+		string sTimeStamp( Export::GetTimeStamp());
+        string sCur;
 
         for( unsigned int n = 0; n < aLanguages.size(); n++ ){
             sCur = aLanguages[ n ];
 					else {
 						sXText = pResData->sText[ SOURCE_LANGUAGE ];
 						/*if ( !sXText.Len())
-							sXText = pResData->sText[ ByteString("en") ];
+							sXText = pResData->sText[ string("en") ];
 						if ( !sXText.Len())
-							sXText = pResData->sText[ ByteString("de") ];*/
+							sXText = pResData->sText[ string("de") ];*/
 					}
 
                     if ( pResData->sHelpText[ sCur ].Len())
 					else {
 						sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ];
 						/*if ( !sXHText.Len())
-							sXHText = pResData->sHelpText[ ByteString("en") ];
+							sXHText = pResData->sHelpText[ string("en") ];
 						if ( !sXText.Len())
-							sXHText = pResData->sHelpText[ ByteString("de") ];*/
+							sXHText = pResData->sHelpText[ string("de") ];*/
 					}
 
                     if ( pResData->sQuickHelpText[ sCur ].Len())
 					else {
 						sXQHText = pResData->sQuickHelpText[ SOURCE_LANGUAGE ];
 						/*if ( !sXQHText.Len())
-							sXQHText = pResData->sQuickHelpText[ ByteString("en") ];
+							sXQHText = pResData->sQuickHelpText[ string("en") ];
 						if ( !sXQHText.Len())
-							sXQHText = pResData->sQuickHelpText[ ByteString("de") ];*/
+							sXQHText = pResData->sQuickHelpText[ string("de") ];*/
 					}
 
                     if ( pResData->sTitle[ sCur ].Len())
 					else {
 						sXTitle = pResData->sTitle[ SOURCE_LANGUAGE ];
 						/*if ( !sXTitle.Len())
-							sXTitle = pResData->sTitle[ ByteString("en") ];
+							sXTitle = pResData->sTitle[ string("en") ];
 						if ( !sXTitle.Len())
-							sXTitle = pResData->sTitle[ ByteString("de") ];*/
+							sXTitle = pResData->sTitle[ string("de") ];*/
 					}
 
 					if ( !sXText.Len())
 						sXText = "-";
 
 					if ( !sXHText.Len()) {
-						/*if ( pResData->sHelpText[ ByteString("de") ].Len())
-							sXHText = pResData->sHelpText[ ByteString("de") ];*/
+						/*if ( pResData->sHelpText[ string("de") ].Len())
+							sXHText = pResData->sHelpText[ string("de") ];*/
 						if ( pResData->sHelpText[ SOURCE_LANGUAGE ].Len())
 							sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ];
-						/*else if ( pResData->sHelpText[ ByteString("en") ].Len())
-							sXHText = pResData->sHelpText[ ByteString("en") ];*/
+						/*else if ( pResData->sHelpText[ string("en") ].Len())
+							sXHText = pResData->sHelpText[ string("en") ];*/
 					}
 				}
 				else
                     sXText = pResData->sText[ sCur ];
 
 				if ( bEnableExport ) {
-					ByteString sOutput( sProject ); sOutput += "\t";
+					string sOutput( sProject ); sOutput += "\t";
 					if ( sRoot.Len())
 						sOutput += sActFileName;
 					sOutput += "\t0\t";
 					sOutput += sLID; sOutput += "\t";
 					sOutput += pResData->sHelpId; sOutput	+= "\t";
 					sOutput += pResData->sPForm; sOutput	+= "\t";
-					sOutput += ByteString::CreateFromInt64( pResData->nWidth ); sOutput += "\t";
+					sOutput += string::CreateFromInt64( pResData->nWidth ); sOutput += "\t";
                     sOutput += sCur; sOutput += "\t";
                     
 
 	}
 	FillInFallbacks( pResData );
 	if ( pResData->pStringList ) {
-		ByteString sList( "stringlist" );
+		string sList( "stringlist" );
 		WriteExportList( pResData, pResData->pStringList, sList, bCreateNew );
 		if ( bCreateNew )
 			pResData->pStringList = 0;
 	}
 	if ( pResData->pFilterList ) {
-		ByteString sList( "filterlist" );
+		string sList( "filterlist" );
 		WriteExportList( pResData, pResData->pFilterList, sList, bCreateNew );
 		if ( bCreateNew )
 			pResData->pFilterList = 0;
 	}
 	if ( pResData->pItemList ) {
-		ByteString sList( "itemlist" );
+		string sList( "itemlist" );
 		WriteExportList( pResData, pResData->pItemList, sList, bCreateNew );
 		if ( bCreateNew )
 			pResData->pItemList = 0;
 	}
 	if ( pResData->pPairedList ) {
-		ByteString sList( "pairedlist" );
+		string sList( "pairedlist" );
 		WriteExportList( pResData, pResData->pPairedList, sList, bCreateNew );
 		if ( bCreateNew )
 			pResData->pItemList = 0;
 	}
 	if ( pResData->pUIEntries ) {
-		ByteString sList( "uientries" );
+		string sList( "uientries" );
 		WriteExportList( pResData, pResData->pUIEntries, sList, bCreateNew );
 		if ( bCreateNew )
 			pResData->pUIEntries = 0;
 	}
 	return TRUE;
 }
-ByteString Export::GetPairedListID( const ByteString& sText ){
+string Export::GetPairedListID( const string& sText ){
 // < "STRING" ; IDENTIFIER ; > ;
-    ByteString sIdent = sText.GetToken( 1, ';' );
-    sIdent.ToUpperAscii();
+    string sIdent = sText.GetToken( 1, ';' );
+    sIdent = ToUpperAscii( sIdent );
     while( sIdent.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
     sIdent.EraseTrailingChars( ' ' );
 	sIdent.EraseLeadingChars( ' ' );
     return sIdent;
 }
-ByteString Export::GetPairedListString( const ByteString& sText ){
+string Export::GetPairedListString( const string& sText ){
 // < "STRING" ; IDENTIFIER ; > ;
-	ByteString sString = sText.GetToken( 0, ';' );
+	string sString = sText.GetToken( 0, ';' );
     while( sString.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
     sString.EraseTrailingChars( ' ' );
-	ByteString s1 = sString.Copy( sString.Search( '\"' )+1 );
+	string s1 = sString.Copy( sString.Search( '\"' )+1 );
 	sString = s1.Copy( 0 , s1.SearchBackward( '\"' ) );
 	sString.EraseTrailingChars( ' ' );
 	sString.EraseLeadingChars( ' ' );
     return sString;
 }
-ByteString Export::StripList( const ByteString& sText ){
-	ByteString s1 = sText.Copy( sText.Search( '\"' ) + 1 );
+string Export::StripList( const string& sText ){
+	string s1 = sText.Copy( sText.Search( '\"' ) + 1 );
 	return s1.Copy( 0 , s1.SearchBackward( '\"' ) );
 }
 
 /*****************************************************************************/
 BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
-						const ByteString &rTyp, BOOL bCreateNew )
+						const string &rTyp, BOOL bCreateNew )
 /*****************************************************************************/
 {
-	ByteString sGID = pResData->sGId;
+	string sGID = pResData->sGId;
 	if ( !sGID.Len())
 		sGID = pResData->sId;
 	else {
 		sGID.EraseTrailingChars( '.' );
 	}
 
-	ByteString sTimeStamp( Export::GetTimeStamp());
-    ByteString sCur;
+	string sTimeStamp( Export::GetTimeStamp());
+    string sCur;
 	for ( ULONG i = 0; pExportList != NULL && i < pExportList->Count(); i++ ) {
 		ExportListEntry *pEntry = pExportList->GetObject( i );
 				// mandatory for export: german and eng. and/or enus
-		//ByteString a("Export::WriteExportList::pEntry");
+		//string a("Export::WriteExportList::pEntry");
 		//Export::DumpMap( a,  *pEntry );
 
-		ByteString sLID( ByteString::CreateFromInt64( i + 1 ));
+		string sLID( string::CreateFromInt64( i + 1 ));
         for( unsigned int n = 0; n < aLanguages.size(); n++ ){
             sCur = aLanguages[ n ];
             if ( //1 )
-				  //(*pEntry)[ ByteString("de") ].Len() &&
+				  //(*pEntry)[ string("de") ].Len() &&
 				 	(*pEntry)[ SOURCE_LANGUAGE ].Len() )
 					//||
-				 	// 	(*pEntry)[ ByteString("en") ].Len()))
+				 	// 	(*pEntry)[ string("en") ].Len()))
 				{
 					if ( bEnableExport )
 					{
-						ByteString sText((*pEntry)[ SOURCE_LANGUAGE ] );
+						string sText((*pEntry)[ SOURCE_LANGUAGE ] );
                         
                         // Strip PairList Line String
 						if( rTyp.EqualsIgnoreCaseAscii("pairedlist") ){
 							//}
 						}
 
-						ByteString sOutput( sProject ); sOutput += "\t";
+						string sOutput( sProject ); sOutput += "\t";
 						if ( sRoot.Len())
 							sOutput += sActFileName;
 						sOutput += "\t0\t";
 }
 
 /*****************************************************************************/
-ByteString Export::FullId()
+string Export::FullId()
 /*****************************************************************************/
 {
-	ByteString sFull;
+	string sFull;
 	if ( nLevel > 1 ) {
 		sFull = aResStack.GetObject( 0 )->sId;
 		for ( USHORT i = 1; i < nLevel - 1; i++ ) {
-			ByteString sToAdd = aResStack.GetObject( i )->sId;
+			string sToAdd = aResStack.GetObject( i )->sId;
 			if ( sToAdd.Len()) {
 				sFull += ".";
 				sFull += sToAdd;
 		}
 	}
     if ( sFull.Len() > 255 ) {
-		ByteString sError( "GroupId > 255 chars" );
+		string sError( "GroupId > 255 chars" );
 	    printf("GroupID = %s\n",sFull.GetBuffer());
         yyerror( sError.GetBufferAccess());
 		sError.ReleaseBufferAccess();
 }
 
 /*****************************************************************************/
-void Export::InsertListEntry( const ByteString &rText, const ByteString &rLine )
+void Export::InsertListEntry( const string &rText, const string &rLine )
 /*****************************************************************************/
 {
 	ResData *pResData = aResStack.GetObject( nLevel-1 );
 
 	if ( nListIndex + 1 > pList->Count()) {
         ExportListEntry *pNew = new ExportListEntry();
-		(*pNew)[ LIST_REFID ] = ByteString::CreateFromInt32( REFID_NONE );
+		(*pNew)[ LIST_REFID ] = string::CreateFromInt32( REFID_NONE );
 		pList->Insert( pNew, LIST_APPEND );
 	}
 	ExportListEntry *pCurEntry = pList->GetObject( nListIndex );
 	//if ( nListLang.EqualsIgnoreCaseAscii("en-US")  ) {
 	if ( Export::isSourceLanguage( nListLang ) ) {
 		if( nList == LIST_PAIRED ){
-			const ByteString sPlist("pairedlist");
-			ByteString sKey = MergeDataFile::CreateKey( sPlist , pResData->sId , GetPairedListID( rLine ) , sFilename );
+			const string sPlist("pairedlist");
+			string sKey = MergeDataFile::CreateKey( sPlist , pResData->sId , GetPairedListID( rLine ) , sFilename );
 			pResData->addFallbackData( sKey , rText );
 		}
 		// new fallback
 		else{
-			const ByteString sPlist("list");
-			ByteString a( pResData->sGId );
+			const string sPlist("list");
+			string a( pResData->sGId );
 			a.Append( "." );
 			a.Append( pResData->sId );
 			sal_Int64 x = nListIndex+1;
-			ByteString b( ByteString::CreateFromInt64( x ) );
-			ByteString sKey = MergeDataFile::CreateKey( sPlist , a , b  , sFilename );
+			string b( string::CreateFromInt64( x ) );
+			string sKey = MergeDataFile::CreateKey( sPlist , a , b  , sFilename );
 			pResData->addFallbackData( sKey , rText );
 		}
 		// new fallback
 }
 
 /*****************************************************************************/
-void Export::CleanValue( ByteString &rValue )
+void Export::CleanValue( string &rValue )
 /*****************************************************************************/
 {
 	while ( rValue.Len()) {
 
 
 /*****************************************************************************/
-ByteString Export::GetText( const ByteString &rSource, int nToken )
+string Export::GetText( const string &rSource, int nToken )
 /*****************************************************************************/
 #define TXT_STATE_NON  	0x000
 #define TXT_STATE_TEXT	0x001
 #define TXT_STATE_MACRO	0x002
 {
-	ByteString sReturn;
+	string sReturn;
 	switch ( nToken ) {
 		case TEXTLINE:
 		case LONGTEXTLINE: {
-			ByteString sTmp( rSource.Copy( rSource.Search( "=" )));
+			string sTmp( rSource.Copy( rSource.Search( "=" )));
 			CleanValue( sTmp );
 			sTmp.EraseAllChars( '\n' );
 			sTmp.EraseAllChars( '\r' );
 
 
 			for ( USHORT i = nStart; i < sTmp.GetTokenCount( '\"' ); i++ ) {
-				ByteString sToken = sTmp.GetToken( i, '\"' );
+				string sToken = sTmp.GetToken( i, '\"' );
 				if ( sToken.Len()) {
 					if ( nState == TXT_STATE_TEXT ) {
 						sReturn += sToken;
 }
 
 /*****************************************************************************/
-void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
+void Export::WriteToMerged( const string &rText , bool bSDFContent )
 /*****************************************************************************/
 {
-	static ByteString SLASH  ('\\');
-    static ByteString RETURN ('\n');
+	static string SLASH  ('\\');
+    static string RETURN ('\n');
 	//printf("%s\n",rText.GetBuffer() );
 
     #if 0
     #endif
 
     if ( !bDontWriteOutput || !bUnmerge ) {
-		ByteString sText( rText );
+		string sText( rText );
 		while ( sText.SearchAndReplace( " \n", "\n" ) != STRING_NOTFOUND ) {};
         if( pParseQueue->bNextIsM && bSDFContent && sText.Len() > 2 ){
             for( USHORT n = 0 ; n < sText.Len() ; n++ ){
         }
         for ( USHORT i = 0; i < sText.Len(); i++ ) {
 			if ( sText.GetChar( i ) != '\n' ){
-				aOutput.Write( ByteString( sText.GetChar( i )).GetBuffer(), 1 );
+				aOutput.Write( string( sText.GetChar( i )).GetBuffer(), 1 );
 				
 			}
             else{
-                aOutput.WriteLine( ByteString());
+                aOutput.WriteLine( string());
             }
 			
 		}
 }
 
 /*****************************************************************************/
-void Export::ConvertMergeContent( ByteString &rText )
+void Export::ConvertMergeContent( string &rText )
 /*****************************************************************************/
 {
 	BOOL bNoOpen = ( rText.Search( "\\\"" ) != 0 );
-	ByteString sClose( rText.Copy( rText.Len() - 2 ));
+	string sClose( rText.Copy( rText.Len() - 2 ));
 	BOOL bNoClose = ( sClose != "\\\"" );
-	ByteString sNew;
+	string sNew;
 	for ( USHORT i = 0; i < rText.Len(); i++ ) {
-		ByteString sChar( rText.GetChar( i ));
+		string sChar( rText.GetChar( i ));
 		if ( sChar == "\\" ) {
 			if (( i + 1 ) < rText.Len()) {
-				ByteString sNext( rText.GetChar( i + 1 ));
+				string sNext( rText.GetChar( i + 1 ));
 				if ( sNext == "\"" ) {
 					sChar = "\"";
 					i++;
 	rText = sNew;
 
 	if ( bNoOpen ) {
-		ByteString sTmp( rText );
+		string sTmp( rText );
 		rText = "\"";
 		rText += sTmp;
 	}
 }
 
 /*****************************************************************************/
-BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
-                                ByteString &nLangIndex, ResData *pResData )
+BOOL Export::PrepareTextToMerge( string &rText, USHORT nTyp,
+                                string &nLangIndex, ResData *pResData )
 /*****************************************************************************/
 {
 	// position to merge in:
 	USHORT nStart = 0;
 	USHORT nEnd = 0;
-	ByteString sOldId = pResData->sId;
-	ByteString sOldGId = pResData->sGId;
-	ByteString sOldTyp = pResData->sResTyp;
+	string sOldId = pResData->sId;
+	string sOldGId = pResData->sGId;
+	string sOldTyp = pResData->sResTyp;
 
-	ByteString sOrigText( rText );
+	string sOrigText( rText );
 
 	switch ( nTyp ) {
 		case LIST_STRING :
 				ExportListEntry *pCurEntry = pList->GetObject( nListIndex - 1 );
 				if ( pCurEntry ) {
 					//printf("%s\n",Export::DumpMap( "pCurEntry", *pCurEntry ).GetBuffer() );
-					//ByteString a("pCurEntry");
+					//string a("pCurEntry");
 					//Export::DumpMap( a , *pCurEntry );
 					rText = (*pCurEntry)[ SOURCE_LANGUAGE ];
 					if( nTyp == LIST_PAIRED ){ 
 			if (( sLastListLine.Search( ">" ) != STRING_NOTFOUND ) &&
 				( sLastListLine.Search( "<" ) == STRING_NOTFOUND ))
 			{
-				ByteString sTmp = sLastListLine;
+				string sTmp = sLastListLine;
 				sLastListLine = "<";
 				sLastListLine += sTmp;
 			}
 			if ( pResData->sResTyp.EqualsIgnoreCaseAscii( "pairedlist" ) ){
                pResData->sId = GetPairedListID( sLastListLine ); 
             }
-            else pResData->sId = ByteString::CreateFromInt32( nListIndex );
+            else pResData->sId = string::CreateFromInt32( nListIndex );
             
 			if ( pResData->sGId.Len())
 				pResData->sGId += ".";
 		case STRING_TYP_TITLE :
 		{
 			/*if ( bUnmerge ) {
-				if (( nLangIndex != ByteString("de") ) &&
-                    ( nLangIndex != ByteString("en-US") ))
+				if (( nLangIndex != string("de") ) &&
+                    ( nLangIndex != string("en-US") ))
 				{
 					bDontWriteOutput = TRUE;
 				}
         pMergeDataFile = new MergeDataFile( sMergeSrc, sFile , bErrorLog, aCharSet);//, bUTF8 );
         
         // Init Languages
-        ByteString sTmp = Export::sLanguages;
-        if( sTmp.ToUpperAscii().Equals("ALL") )
+        string sTmp = Export::sLanguages;
+        if( ToUpperAscii(sTmp) = "ALL" )
             SetLanguages( pMergeDataFile->GetLanguages() );
         else if( !isInitialized )InitLanguages();
 
 		return FALSE; // no data found
 	}
 
-	ByteString sContent;
+	string sContent;
 	pEntrys->GetTransex3Text( sContent, nTyp, nLangIndex );
 	//if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) {
 	if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) {
 		return FALSE;
 	}
 
-	ByteString sPostFix( rText.Copy( ++nEnd ));
+	string sPostFix( rText.Copy( ++nEnd ));
 	rText.Erase( nStart );
 
 	//ConvertMergeContent( sContent, nTyp );
 		pMergeDataFile = new MergeDataFile( sMergeSrc, sFile ,bErrorLog, aCharSet);//, bUTF8 );
   
         // Init Languages
-        ByteString sTmp = Export::sLanguages;
-        if( sTmp.ToUpperAscii().Equals("ALL") )
+        string sTmp = Export::sLanguages;
+        if( ToUpperAscii(sTmp) == "ALL" )
             SetLanguages( pMergeDataFile->GetLanguages() );
         else if( !isInitialized )InitLanguages();
 
                 
 				BOOL bAddSemikolon = FALSE;
 				BOOL bFirst = TRUE;
-                ByteString sCur;
-                ByteString sTmp = Export::sLanguages;
+                string sCur;
+                string sTmp = Export::sLanguages;
 
                 for( unsigned int n = 0; n < aLanguages.size(); n++ ){
                     sCur = aLanguages[ n ];
 
-                    ByteString sText;
+                    string sText;
                     BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE );
 					if ( bText && sText.Len() && sText != "-" ) {
-						ByteString sOutput;
+						string sOutput;
 						if ( bNextMustBeDefineEOL)  {
 							if ( bFirst )
 								sOutput += "\t\\\n";
       
 
 				if ( bAddSemikolon ) {
-					ByteString sOutput( ";" );
+					string sOutput( ";" );
 					WriteToMerged( sOutput , false );
 				}
 			}
 			if ( pEntry && pResData->bQuickHelpText ) {
 				BOOL bAddSemikolon = FALSE;
 				BOOL bFirst = TRUE;
-                ByteString sCur;
+                string sCur;
 
                 for( unsigned int n = 0; n < aLanguages.size(); n++ ){
                     sCur = aLanguages[ n ];
 
-					ByteString sText;
+					string sText;
                     BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
 					if ( bText && sText.Len() && sText != "-" ) {
-						ByteString sOutput;
+						string sOutput;
 						if ( bNextMustBeDefineEOL)  {
 							if ( bFirst )
 								sOutput += "\t\\\n";
 					}
 				}
 				if ( bAddSemikolon ) {
-					ByteString sOutput( ";" );
+					string sOutput( ";" );
 					WriteToMerged( sOutput , false );
 				}
 			}
 			if ( pEntry && pResData->bTitle ) {
 				BOOL bAddSemikolon = FALSE;
 				BOOL bFirst = TRUE;
-                ByteString sCur;
+                string sCur;
 
                 for( unsigned int n = 0; n < aLanguages.size(); n++ ){
                     sCur = aLanguages[ n ];
 
-                ByteString sText;
+                string sText;
                     BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE );
 					if ( bText && sText.Len() && sText != "-" ) {
-						ByteString sOutput;
+						string sOutput;
 						if ( bNextMustBeDefineEOL)  {
 							if ( bFirst )
 								sOutput += "\t\\\n";
 					}
 				}
 				if ( bAddSemikolon ) {
-					ByteString sOutput( ";" );
+					string sOutput( ";" );
 					WriteToMerged( sOutput ,false);
 				}
 			}
 				//pResData->Dump();
 				
 				bool bPairedList = false;
-				ByteString sOldId = pResData->sId;
-				ByteString sOldGId = pResData->sGId;
-				ByteString sOldTyp = pResData->sResTyp;
+				string sOldId = pResData->sId;
+				string sOldGId = pResData->sGId;
+				string sOldTyp = pResData->sResTyp;
 				if ( pResData->sGId.Len())
 					pResData->sGId += ".";
 				pResData->sGId += sOldId;
-				ByteString sSpace;
+				string sSpace;
 				for ( USHORT i = 1; i < nLevel-1; i++ )
 					sSpace += "\t";
 				for ( USHORT nT = LIST_STRING; nT <= LIST_UIENTRIES; nT++ ) {
 						case LIST_ITEM : pResData->sResTyp = "itemlist"; pList = pResData->pItemList;       bPairedList = false; break;
                         case LIST_PAIRED : pResData->sResTyp = "pairedlist"; pList = pResData->pPairedList; bPairedList = true;  break;
 					}
-                    ByteString sCur;
+                    string sCur;
                     for( unsigned int n = 0; n < aLanguages.size(); n++ ){
                         sCur = aLanguages[ n ];				
 						USHORT nIdx = 1;
 							pResData->sId = GetPairedListID ( (*pListE)[ SOURCE_LANGUAGE ] );
 						} 
 						else
-							pResData->sId = ByteString("1");
+							pResData->sId = string("1");
 						
 						PFormEntrys *pEntrys;
 						ULONG nLIndex = 0;
 						pEntrys = pMergeDataFile->GetPFormEntrys( pResData );
                         while( pEntrys  && ( nLIndex < nMaxIndex )) {
 						    //printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex);
-							ByteString sText;
+							string sText;
                             BOOL bText;
 							bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE );
 							if( !bText )
 							//if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){ 
 							if( !bText && bPairedList ){ 
 								if( pResData->isMerged( sCur ) ) break; 
-								const ByteString sPlist("pairedlist");
-								ByteString sKey = MergeDataFile::CreateKey( sPlist , pResData->sGId , pResData->sId , sFilename );
+								const string sPlist("pairedlist");
+								string sKey = MergeDataFile::CreateKey( sPlist , pResData->sGId , pResData->sId , sFilename );
 								bText = pResData->getFallbackData( sKey , sText );
 							}else if ( !bText ){// new fallback
 								if( pResData->isMerged( sCur ) ) break; 
-								const ByteString sPlist("list");
-								ByteString sKey = MergeDataFile::CreateKey( sPlist , pResData->sGId , pResData->sId , sFilename );
+								const string sPlist("list");
+								string sKey = MergeDataFile::CreateKey( sPlist , pResData->sGId , pResData->sId , sFilename );
 								bText = pResData->getFallbackData( sKey , sText );
 							} // new fallback
 
 							if ( bText && sText.Len()) {
 								//if( pEntrys ) pEntrys->Dump();							
 								if ( nIdx == 1 ) {
-									ByteString sHead;
+									string sHead;
 									if ( bNextMustBeDefineEOL ) 
 										sHead = "\\\n\t";
 									sHead += sSpace;
 									}
 									WriteToMerged( sHead , true);
 								}
-								ByteString sLine;
+								string sLine;
 								if ( pList && pList->GetObject( nLIndex )) 
 									sLine = ( *pList->GetObject( nLIndex ))[ SOURCE_LANGUAGE ];
 								if ( !sLine.Len())
 								USHORT nStart, nEnd;
 								nStart = sLine.Search( "\"" );
 							
-								ByteString sPostFix;
+								string sPostFix;
 								if( !bPairedList ){
 									nEnd = sLine.SearchBackward( '\"' );
-									sPostFix = ByteString( sLine.Copy( ++nEnd ));
+									sPostFix = string( sLine.Copy( ++nEnd ));
 									sLine.Erase( nStart );
 								}
 
 									sLine += sPostFix;
 								}
 
-								ByteString sText1( "\t" );
+								string sText1( "\t" );
 								sText1 += sLine;
 								if ( bDefine || bNextMustBeDefineEOL )
 									sText1 += " ;\\\n";
 									}
                                 }
                                 else
-                                    pResData->sId = ByteString::CreateFromInt32( ++nIdx );
+                                    pResData->sId = string::CreateFromInt32( ++nIdx );
                             }
 							else
 								break;
 								pEntrys = oldEntry;
 						}
 						if ( nIdx > 1 ) {
-							ByteString sFooter( sSpace.Copy( 1 ));
+							string sFooter( sSpace.Copy( 1 ));
 							if ( bNextMustBeDefineEOL )
 								sFooter += "};";
 							else if ( !bDefine )
 			ULONG nMaxIndex = 0;
 			if ( pList )
 				nMaxIndex = pList->GetSourceLanguageListEntryCount();
-			ByteString sLine;
+			string sLine;
 			if ( pList && pList->GetObject( nListIndex )) 
 				sLine = ( *pList->GetObject( nListIndex ))[ SOURCE_LANGUAGE ];
 			if ( !sLine.Len())
 			}
 
 			while( PrepareTextToMerge( sLine, nList, nListLang, pResData ) && ( nListIndex <= nMaxIndex )) { 
-				ByteString sText( "\t" );
+				string sText( "\t" );
 				sText += sLine;
 				sText += " ;";
 				sText += "\n";
     pParseQueue->bMflag = false;
 }
 
-ByteString Export::MergePairedList( ByteString& sLine , ByteString& sText ){
+string Export::MergePairedList( string& sLine , string& sText ){
 // < "xy" ; IDENTIFIER ; >
-	ByteString sPre  = sLine.Copy( 0 , sLine.Search('\"') );
-	ByteString sPost = sLine.Copy( sLine.SearchBackward('\"') + 1 , sLine.Len() );
+	string sPre  = sLine.Copy( 0 , sLine.Search('\"') );
+	string sPost = sLine.Copy( sLine.SearchBackward('\"') + 1 , sLine.Len() );
 	sPre.Append( sText );
 	sPre.Append( sPost );
 	return sPre;