mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 00:43:32 +00:00
ICU-2334 Use a UTF-8 BOM so that mainframes can read the file.
X-SVN-Rev: 14866
This commit is contained in:
parent
4b6963b6d6
commit
2d46833dca
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue