From: "ima1zumi (Mari Imaizumi) via ruby-core" Date: 2026-04-14T03:47:48+00:00 Subject: [ruby-core:125255] [Ruby Misc#21975] Add "UTF-八" as an alias for UTF-8 encoding Issue #21975 has been updated by ima1zumi (Mari Imaizumi). Status changed from Open to Rejected While I appreciate the proposal, I must reject it for two reasons: First, on consistency: the vertical writing is allowed only inside string arguments, while the rest of Ruby code remains horizontal. This is inconsistent. Second, on environmental impact: the vertical writing form requires a lot of whitespace, which is not eco-friendly. ���� ---------------------------------------- Misc #21975: Add "UTF-���" as an alias for UTF-8 encoding https://bugs.ruby-lang.org/issues/21975#change-116999 * Author: ko1 (Koichi Sasada) * Status: Rejected ---------------------------------------- In Japan, legal texts must write all characters - including digits - using full-width or kanji forms. As a result, the encoding name "UTF-8" appears as "UTF-���" (��� = eight in kanji) in official government notices. Specifically, it appears in a notice issued by the Digital Agency and the Ministry of Internal Affairs and Communications (������8���������������������������������������12���), which defines character sets and encoding for local government information systems: > ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ Reference: https://www.digital.go.jp/assets/contents/node/basic_page/field_ref_resources/d12bde7e-a950-493b-987c-0f8d4bbd1b6b/66117898/20260324_laws_notice_text_02.pdf This patch adds "UTF-���" as an encoding alias for UTF-8, so that Ruby is compliant with Japanese law. ```ruby # encoding: UTF-��� p __ENCODING__ #=> # p Encoding.find("UTF-���") #=> # p "hello".encode("UTF-���") #=> "hello" p "���������������".force_encoding("UTF-���") #=> "���������������" p "���������������".encode("��� ��� ��� ��� ���") #=> "���������������" ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/