Loading lib/jsduck/util/io.rb +4 −2 Original line number Diff line number Diff line Loading @@ -8,13 +8,15 @@ module JsDuck # have surprising results. So in here we read in all files in UTF-8 # (the default) or in some other encoding specified through --encoding # option and convert it to UTF-8 internally. # # We also allow for UTF-8 byte order mark. class IO @@encoding = "UTF-8" @@encoding = "BOM|UTF-8" # Sets the external encoding to be used for reading files. # When it's different from UTF-8, the input will be converted to UTF-8. def self.encoding=(e) if e =~ /^UTF-8$/i if e =~ /^(BOM\|)?UTF-8$/i @@encoding = e else @@encoding = e+":UTF-8" Loading Loading
lib/jsduck/util/io.rb +4 −2 Original line number Diff line number Diff line Loading @@ -8,13 +8,15 @@ module JsDuck # have surprising results. So in here we read in all files in UTF-8 # (the default) or in some other encoding specified through --encoding # option and convert it to UTF-8 internally. # # We also allow for UTF-8 byte order mark. class IO @@encoding = "UTF-8" @@encoding = "BOM|UTF-8" # Sets the external encoding to be used for reading files. # When it's different from UTF-8, the input will be converted to UTF-8. def self.encoding=(e) if e =~ /^UTF-8$/i if e =~ /^(BOM\|)?UTF-8$/i @@encoding = e else @@encoding = e+":UTF-8" Loading