buildRubyGem: fixes gemspec UTF-8 loading issue
If a gemspec has UTF-8 characters in it, ruby will fail loading it with
invalid multibyte char (US-ASCII)
This change forces the encoding to be correct, we assume everyone now
uses UTF-8.
This commit is contained in:
@@ -6,6 +6,11 @@ require 'fileutils'
|
|||||||
require 'pathname'
|
require 'pathname'
|
||||||
require 'tmpdir'
|
require 'tmpdir'
|
||||||
|
|
||||||
|
if defined?(Encoding.default_internal)
|
||||||
|
Encoding.default_internal = Encoding::UTF_8
|
||||||
|
Encoding.default_external = Encoding::UTF_8
|
||||||
|
end
|
||||||
|
|
||||||
# Options:
|
# Options:
|
||||||
#
|
#
|
||||||
# name - the gem name
|
# name - the gem name
|
||||||
|
|||||||
Reference in New Issue
Block a user