Skip to content

Commit 2aa83fa

Browse files
committed
Assume .pc uses UTF-8
mariadb.pc has non ASCII characters...
1 parent b83b264 commit 2aa83fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/pkg-config.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,9 @@ def parse_pc
514514
@declarations = {}
515515
File.open(pc_path) do |input|
516516
input.each_line do |line|
517+
if line.dup.force_encoding("UTF-8").valid_encoding?
518+
line.force_encoding("UTF-8")
519+
end
517520
line = line.gsub(/#.*/, "").strip
518521
next if line.empty?
519522
case line

0 commit comments

Comments
 (0)