Modified: xerces/c/trunk/tools/NLS/Xlat/Xlat_ICUResourceBundle.cpp URL: http://svn.apache.org/viewvc/xerces/c/trunk/tools/NLS/Xlat/Xlat_ICUResourceBundle.cpp?rev=637794&r1=637793&r2=637794&view=diff ============================================================================== --- xerces/c/trunk/tools/NLS/Xlat/Xlat_ICUResourceBundle.cpp (original) +++ xerces/c/trunk/tools/NLS/Xlat/Xlat_ICUResourceBundle.cpp Mon Mar 17 02:07:38 2008 @@ -105,11 +105,11 @@ // #ifdef ICU_RESBUNDLE_IN_TABLE_FORM - fwprintf(fOutFl, L"\t\t %3d { \"%s \" } \n", curId, xmlStrToPrintable(msgText)); + fwprintf(fOutFl, L"\t\t %3d { \"%s\" } \n", curId, xmlStrToPrintable(msgText)); releasePrintableStr // need to print leading 0 if less than 100, not tested yet #else - fwprintf(fOutFl, L"\t\t\"%s \" ,\n", xmlStrToPrintable(msgText)); + fwprintf(fOutFl, L"\t\t\"%s\" ,\n", xmlStrToPrintable(msgText)); releasePrintableStr // need a space between the last character and the closing " #endif
Modified: xerces/c/trunk/tools/NLS/Xlat/Xlat_Win32RC.cpp URL: http://svn.apache.org/viewvc/xerces/c/trunk/tools/NLS/Xlat/Xlat_Win32RC.cpp?rev=637794&r1=637793&r2=637794&view=diff ============================================================================== --- xerces/c/trunk/tools/NLS/Xlat/Xlat_Win32RC.cpp (original) +++ xerces/c/trunk/tools/NLS/Xlat/Xlat_Win32RC.cpp Mon Mar 17 02:07:38 2008 @@ -81,9 +81,27 @@ // fwprintf(fOutFl, L" %-16d L\"", messageId + fMsgOffset); + bool isOnlyASCII=true; const XMLCh* rawData = msgText; while (*rawData) - fwprintf(fOutFl, L"\\x%04lX", *rawData++); + { + // don't allow " or \ in the message + if(*rawData > 0xFF || strchr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789{}[]()',-+ &.;:<>?!|*=/#_", *rawData)==NULL) + { + isOnlyASCII=false; + break; + } + rawData++; + } + + if(isOnlyASCII) + fwprintf(fOutFl, msgText); + else + { + const XMLCh* rawData = msgText; + while (*rawData) + fwprintf(fOutFl, L"\\x%04lX", *rawData++); + } fwprintf(fOutFl, L"\\x00\"\n"); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
