From 997def54abd5533b7b82182ecfa93883e147a0ba Mon Sep 17 00:00:00 2001 From: Naoki Takezoe Date: Sun, 21 Aug 2022 22:50:12 +0900 Subject: [PATCH] Set UTF-8 as the default commit charset at the online text editor (#3112) --- src/main/scala/gitbucket/core/util/StringUtil.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/gitbucket/core/util/StringUtil.scala b/src/main/scala/gitbucket/core/util/StringUtil.scala index 724ab98c0..42cb2b54d 100644 --- a/src/main/scala/gitbucket/core/util/StringUtil.scala +++ b/src/main/scala/gitbucket/core/util/StringUtil.scala @@ -98,8 +98,8 @@ object StringUtil { detector.handleData(content, 0, content.length) detector.dataEnd() detector.getDetectedCharset match { - case null => "UTF-8" - case e => e + case null | "US-ASCII" => "UTF-8" + case e => e } }