projects
/
chise
/
ruby.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
i
[chise/ruby.git]
/
tools
/
trim_bom.rb
1
#!/usr/bin/env ruby
2
# Copyright (C) 2002-2004 Kouichirou Eto, All rights reserved.
3
# remove BOM at the begining of the file by eto 2002-1203
4
5
STDOUT.binmode
6
while gets
7
if /^\M-o\M-;\M-?/
8
$_.sub!(/^\M-o\M-;\M-?/, "")
9
end
10
print $_
11
end