From: duerst@... Date: 2019-07-14T05:21:12+00:00 Subject: [ruby-dev:50813] [Ruby master Feature#15931] encoding for CESU-8 Issue #15931 has been updated by duerst (Martin Dürst). Status changed from Closed to Open Reopened to consider whether we can make the CESU-8 encoding a dummy encoding now that we have the encoding conversion from/to UTF-8 (see issue #15995). ---------------------------------------- Feature #15931: encoding for CESU-8 https://bugs.ruby-lang.org/issues/15931#change-79383 * Author: arton (Akio Tajima) * Status: Open * Priority: Normal * Assignee: naruse (Yui NARUSE) * Target version: 2.7 ---------------------------------------- RubyとJavaのブリッジを開発していて、文字列の変換処理で困っています。 現象) JavaのUTF-8は非標準的な形式 (https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/types.html#modified_utf_8_strings) なので、Ruby側の文字列をそのままUTF-8にエンコードして与えると、Java側ではサロゲートペアに相当する文字を正しく認識できません。 お願い) Java固有の拡張UTF-8は一般性が欠けていると考えられますが、ほぼ互換のCESU-8 (https://www.unicode.org/reports/tr26/tr26-4.html) は、IANAの文字セットにも登録されていて通信などでそれなりに利用されているようなので、RubyのEncodingでサポートしていただきたいと思います。 よろしくご検討ください。 -- https://bugs.ruby-lang.org/