ICU-2334 Use a UTF-8 BOM so that mainframes can read the file.

X-SVN-Rev: 14866
This commit is contained in:
George Rhoten 2004-04-05 20:22:54 +00:00
parent 4b6963b6d6
commit 2d46833dca

View file

@ -102,6 +102,10 @@ UBool TextFile::readLine(UnicodeString& line, UErrorCode& ec) {
}
if (!setBuffer(n++, 0, ec)) return FALSE;
line = UnicodeString(buffer, encoding);
if (line[0] == 0xFEFF) {
/* Remove any UTF BOMs */
line.replaceBetween(0,1,"");
}
++lineNo;
return TRUE;
}