/*
*******************************************************************************
*
-* Copyright (C) 2002-2012, International Business Machines
+* Copyright (C) 2002-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
*
*******************************************************************************
*/
+
+// Safer use of UnicodeString.
+#ifndef UNISTR_FROM_CHAR_EXPLICIT
+# define UNISTR_FROM_CHAR_EXPLICIT explicit
+#endif
+
+// Less important, but still a good idea.
+#ifndef UNISTR_FROM_STRING_EXPLICIT
+# define UNISTR_FROM_STRING_EXPLICIT explicit
+#endif
+
#include "reslist.h"
#include "unewdata.h"
#include "unicode/ures.h"
#include "unicode/ucnv.h"
#include "genrb.h"
#include "rle.h"
-#include "ucol_tok.h"
#include "uhash.h"
#include "uresimp.h"
#include "unicode/ustring.h"
*status = U_FILE_ACCESS_ERROR;
goto cleanup_bundle_write_xml;
}
- write_utf8_file(out, xmlHeader);
+ write_utf8_file(out, UnicodeString(xmlHeader));
if(outputEnc && *outputEnc!='\0'){
/* store the output encoding */
goto cleanup_bundle_write_xml;
}
}
- write_utf8_file(out, bundleStart);
+ write_utf8_file(out, UnicodeString(bundleStart));
write_tabs(out);
- write_utf8_file(out, fileStart);
+ write_utf8_file(out, UnicodeString(fileStart));
/* check if lang and language are the same */
if(language != NULL && uprv_strcmp(lang, srBundle->fLocale)!=0){
fprintf(stderr,"Warning: The top level tag in the resource and language specified are not the same. Please check the input.\n");
tabCount += 1;
write_tabs(out);
- write_utf8_file(out, headerStart);
+ write_utf8_file(out, UnicodeString(headerStart));
tabCount += 1;
write_tabs(out);
- write_utf8_file(out, tool_start);
+ write_utf8_file(out, UnicodeString(tool_start));
printAttribute("tool-id", tool_id, (int32_t) uprv_strlen(tool_id));
printAttribute("tool-name", tool_name, (int32_t) uprv_strlen(tool_name));
write_utf8_file(out, UnicodeString("/>\n"));