Skip to content

Commit a91ca38

Browse files
committed
IO-341 A constant for holding the BOM character (U+FEFF)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1468905 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7b9147e commit a91ca38

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ The <action> type attribute can be add,update,fix,remove.
4747
<body>
4848
<!-- The release date is the date RC is cut -->
4949
<release version="2.5" date="2013-??-??" description="New features and bug fixes.">
50+
<action issue="IO-341" dev="sebb" type="add">
51+
A constant for holding the BOM character (U+FEFF)
52+
</action>
5053
<action issue="IO-314" dev="sebb" type="fix">
5154
Deprecate and then remove all methods that use the default encoding
5255
</action>

src/main/java/org/apache/commons/io/ByteOrderMark.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ public class ByteOrderMark implements Serializable {
5353
*/
5454
public static final ByteOrderMark UTF_32LE = new ByteOrderMark("UTF-32LE", 0xFF, 0xFE, 0x00, 0x00);
5555

56+
/**
57+
* Unicode BOM character; external form depends on the encoding.
58+
* @see <a href="http://unicode.org/faq/utf_bom.html#BOM">Byte Order Mark (BOM) FAQ</a>
59+
* @since 2.5
60+
*/
61+
public static final char UTF_BOM = '\uFEFF';
62+
5663
private final String charsetName;
5764
private final int[] bytes;
5865

0 commit comments

Comments
 (0)