Merge pull request #19864 from Homebrew/api-utf8
api: force encoding to UTF-8
This commit is contained in:
		
						commit
						bbac5be4d3
					
				@ -96,7 +96,7 @@ module Homebrew
 | 
			
		||||
 | 
			
		||||
        mtime = insecure_download ? Time.new(1970, 1, 1) : Time.now
 | 
			
		||||
        FileUtils.touch(target, mtime:) unless skip_download
 | 
			
		||||
        JSON.parse(target.read, freeze: true)
 | 
			
		||||
        JSON.parse(target.read(encoding: Encoding::UTF_8), freeze: true)
 | 
			
		||||
      rescue JSON::ParserError
 | 
			
		||||
        target.unlink
 | 
			
		||||
        retry_count += 1
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user