Skip to content

Commit

Permalink
misc: add scripts for handling BOM
Browse files Browse the repository at this point in the history
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Mar 5, 2022
1 parent f476dfe commit 57d0d76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions misc/addbom
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
e=/bin/echo

$e -ne '\xef'
$e -ne '\xbb'
$e -ne '\xbf'
cat $1
2 changes: 2 additions & 0 deletions misc/hasbom
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
test "$(od --endian=big -x -A n -N 3 $1)" = " efbb bf00"

0 comments on commit 57d0d76

Please sign in to comment.