From c7a4bad088393b3adad9ce05225d9952b0be8217 Mon Sep 17 00:00:00 2001 From: Yessiest Date: Wed, 19 Jun 2024 16:45:45 +0400 Subject: [PATCH] fixed encoding for forms --- lib/landline/util/multipart.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/landline/util/multipart.rb b/lib/landline/util/multipart.rb index 4ed8617..cd8e995 100644 --- a/lib/landline/util/multipart.rb +++ b/lib/landline/util/multipart.rb @@ -28,7 +28,7 @@ module Landline # Decode charset parameter def decode(data) data = Landline::Util.unescape_html(data) - return data unless self.headers['charset'] + return data.force_encoding("UTF-8") unless self.headers['charset'] data.force_encoding(self.headers['charset']).encode("UTF-8") end