Unicode and Byte Order Mark (BOM)

asked 14 Sep '11, 10:08

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%


Certain Unicode-encoded files (typically those created by Windows utilities) will include a BOM. If you read the contents of such a file and need to remove it, you can do as follows:

<readFile>
   <encoding>unicode</encoding>
   <name>text</name>
   <path>/path/to/file.txt</path>
</readFile>
<setInstallerVariableFromRegEx>
   <name>text</name>
   <pattern>\uFEFF</pattern>
   <substitution></substitution>
   <text>${text}</text>
</setInstallerVariableFromRegEx>

link

answered 14 Sep '11, 10:09

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5
×2
×1
×1
×1

Asked: 14 Sep '11, 10:08

Seen: 724 times

Last updated: 15 Sep '11, 08:33