lib/fluent/plugin/grok.rb in fluent-plugin-grok-parser-2.1.3 vs lib/fluent/plugin/grok.rb in fluent-plugin-grok-parser-2.1.4

- old
+ new

@@ -33,10 +33,10 @@ @multiline_start_regexp = Regexp.compile(@conf["multiline_start_regexp"][1..-2]) end end def add_patterns_from_file(path) - File.open(path, "r").each_line do |line| + File.open(path, "r:utf-8:utf-8").each_line do |line| next if line[0] == "#" || /^$/ =~ line name, pat = line.chomp.split(/\s+/, 2) @pattern_map[name] = pat end end