mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
force UTF-8 encoding for gem file reading
This commit is contained in:
parent
b982a1ecbe
commit
c94d3d628e
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,9 @@ module LogStash
|
||||||
end
|
end
|
||||||
|
|
||||||
def load(with_backup = true)
|
def load(with_backup = true)
|
||||||
|
# encoding must be set to UTF-8 here to avoid ending up with Windows-1252 encoding on Windows
|
||||||
|
# which will break the DSL instance_eval of that string
|
||||||
|
@io.set_encoding(Encoding::UTF_8)
|
||||||
@gemset ||= DSL.parse(@io.read)
|
@gemset ||= DSL.parse(@io.read)
|
||||||
backup if with_backup
|
backup if with_backup
|
||||||
self
|
self
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue