Project

General

Profile

Patch #34750

Updated by Go MAEDA about 3 years ago

ISO-2022-KR and ISCII91 are no longer supported by Ruby. These encodings should be removed from @Setting::ENCODINGS@ constant. 

 Iconv library used in Redmine 2.6 and earlier supported these two encodings, but @String#encode@ used in Redmine 3.0 and later does not. 

 <pre> 
 $ ruby -e '"foo".encode("ISO-2022-KR")' 
 Traceback (most recent call last): 
	 1: from -e:1:in `<main>' 
 -e:1:in `encode': code converter not found (UTF-8 to ISO-2022-KR) (Encoding::ConverterNotFoundError) 
 </pre> 

 <pre> 
 $ ruby -e '"foo".encode("ISCII91")' 
 Traceback (most recent call last): 
	 1: from -e:1:in `<main>' 
 -e:1:in `encode': code converter not found (UTF-8 to ISCII91) (Encoding::ConverterNotFoundError) 
 </pre> 

 <pre> 
 $ ruby -e 'p Encoding.list.map(&:to_s)' 
 ["ASCII-8BIT", "UTF-8", "US-ASCII", "UTF-16BE", "UTF-16LE", "UTF-32BE", "UTF-32LE", "UTF-16", "UTF-32", "UTF8-MAC", "EUC-JP", "Windows-31J", "Big5", "Big5-HKSCS", "Big5-UAO", "CP949", "Emacs-Mule", "EUC-KR", "EUC-TW", "GB2312", "GB18030", "GBK", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-11", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "KOI8-R", "KOI8-U", "Shift_JIS", "Windows-1250", "Windows-1251", "Windows-1252", "Windows-1253", "Windows-1254", "Windows-1257", "IBM437", "IBM737", "IBM775", "CP850", "IBM852", "CP852", "IBM855", "CP855", "IBM857", "IBM860", "IBM861", "IBM862", "IBM863", "IBM864", "IBM865", "IBM866", "IBM869", "Windows-1258", "GB1988", "macCentEuro", "macCroatian", "macCyrillic", "macGreek", "macIceland", "macRoman", "macRomania", "macThai", "macTurkish", "macUkraine", "CP950", "CP951", "IBM037", "stateless-ISO-2022-JP", "eucJP-ms", "CP51932", "EUC-JIS-2004", "GB12345", "ISO-2022-JP", "ISO-2022-JP-2", "CP50220", "CP50221", "Windows-1256", "Windows-1255", "TIS-620", "Windows-874", "MacJapanese", "UTF-7", "UTF8-DoCoMo", "SJIS-DoCoMo", "UTF8-KDDI", "SJIS-KDDI", "ISO-2022-JP-KDDI", "stateless-ISO-2022-JP-KDDI", "UTF8-SoftBank", "SJIS-SoftBank"] 
 $ ruby -e 'p Encoding.list.map(&:to_s)' | grep -ci -e ISO-2022-KR -e ISCII9 
 0 
 </pre> 

 <pre> 
 $ curl -O https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz 
 $ tar xvf ruby-2.7.2.tar.gz //cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz 
 $ cd ruby-2.7.2 
 $ grep -ir -e ISO-2022-KR -e ISCII9 * 
 $ 
 </pre> 

Back