Skip to content

Commit bd94b33

Browse files
committed
Ignore BOM mark.
closes #16.
1 parent b0a8516 commit bd94b33

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

JSON.awk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/awk -f
22
#
33
# Software: JSON.awk - a practical JSON parser written in awk
4-
# Version: 1.3
4+
# Version: 1.3.1
55
# Copyright (c) 2013-2019, step
66
# License: MIT or Apache 2
77
# Project home: https://github.com/step-/JSON.awk
@@ -57,6 +57,10 @@ BEGIN { #{{{1
5757
srand(); RS="n/o/m/a/t/c/h" rand()
5858
}
5959

60+
1 == NR && match($0, /^\xEF\xBB\xBF/) { # strip BOM mark {{{1
61+
$0 = substr($0, RLENGTH + 1)
62+
}
63+
6064
{ # main loop: process each file in turn {{{1
6165
reset() # See important application note in reset()
6266

0 commit comments

Comments
 (0)