<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_transcode.rb, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Extract transcoding assertions</title>
<updated>2023-10-28T13:18:17+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-10-28T13:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a447a6d1a9c08166ee517a53d3e824ac5bf12ed3'/>
<id>a447a6d1a9c08166ee517a53d3e824ac5bf12ed3</id>
<content type='text'>
- Prefix `check_both_ways` with `assert_` to show proper failure
  lines.

- Extract dedicated assertions for Encoding::UndefinedConversionError
  and Encoding::InvalidByteSequenceError.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Prefix `check_both_ways` with `assert_` to show proper failure
  lines.

- Extract dedicated assertions for Encoding::UndefinedConversionError
  and Encoding::InvalidByteSequenceError.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove get_actual_encoding() and the dynamic endian detection for dummy UTF-16/UTF-32</title>
<updated>2022-09-12T12:02:34+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2022-09-10T17:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6525b6f760ccd9612c9546b0313ab1c7e4af5e66'/>
<id>6525b6f760ccd9612c9546b0313ab1c7e4af5e66</id>
<content type='text'>
* And simplify callers of get_actual_encoding().
* See [Feature #18949].
* See https://github.com/ruby/ruby/pull/6322#issuecomment-1242758474
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* And simplify callers of get_actual_encoding().
* See [Feature #18949].
* See https://github.com/ruby/ruby/pull/6322#issuecomment-1242758474
</pre>
</div>
</content>
</entry>
<entry>
<title>Support Encoding::Converter newline: :lf and :lf_newline options</title>
<updated>2022-08-20T03:23:36+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-06-18T23:05:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6f3857f6a7b3cd6bd7e62e4efdbb1b841544e053'/>
<id>6f3857f6a7b3cd6bd7e62e4efdbb1b841544e053</id>
<content type='text'>
Previously, newline: :lf was accepted but ignored.  Where it
should have been used was commented out code that didn't work,
but unlike all other invalid values, using newline: :lf did
not raise an error.

This adds support for newline: :lf and :lf_newline, for consistency
with newline: :cr and :cr_newline.  This is basically the same as
universal_newline, except that it only affects writing and not
reading due to RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK.

Add tests for the File.open :newline option while here.

Fixes [Bug #12436]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, newline: :lf was accepted but ignored.  Where it
should have been used was commented out code that didn't work,
but unlike all other invalid values, using newline: :lf did
not raise an error.

This adds support for newline: :lf and :lf_newline, for consistency
with newline: :cr and :cr_newline.  This is basically the same as
universal_newline, except that it only affects writing and not
reading due to RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK.

Add tests for the File.open :newline option while here.

Fixes [Bug #12436]
</pre>
</div>
</content>
</entry>
<entry>
<title>- add regression tests for U+6E7F (湿) in ISO-2022-JP</title>
<updated>2021-07-01T08:33:43+00:00</updated>
<author>
<name>Martin Dürst</name>
<email>duerst@it.aoyama.ac.jp</email>
</author>
<published>2021-07-01T08:33:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f6539202c52a051a4e6946a318a1d9cd29002990'/>
<id>f6539202c52a051a4e6946a318a1d9cd29002990</id>
<content type='text'>
  In ISO-2022-JP, the bytes use to code are the same as those for "&lt;&gt;".
  This adds regression tests to make sure that these bytes, when representing
  湿, are NOT　escaped with encode("ISO-2022-JP, xml: :text) or similar.
  These are additional regression tests for #12052.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  In ISO-2022-JP, the bytes use to code are the same as those for "&lt;&gt;".
  This adds regression tests to make sure that these bytes, when representing
  湿, are NOT　escaped with encode("ISO-2022-JP, xml: :text) or similar.
  These are additional regression tests for #12052.
</pre>
</div>
</content>
</entry>
<entry>
<title>Work around issue transcoding issue with non-ASCII compatible encodings and xml escaping</title>
<updated>2021-06-26T19:32:39+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-06-26T19:32:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c'/>
<id>e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c</id>
<content type='text'>
When using a non-ASCII compatible source and destination encoding
and xml escaping (the :xml option to String#encode), the resulting
string was broken, as it used the correct non-ASCII compatible
encoding, but contained data that was ASCII-compatible instead of
compatible with the string's encoding.

Work around this issue by detecting the case where both the
source and destination encoding are non-ASCII compatible, and
transcoding the source string from the non-ASCII compatible
encoding to UTF-8. The xml escaping code will correctly handle
the UTF-8 source string and the return the correctly encoded
and escaped value.

Fixes [Bug #12052]

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using a non-ASCII compatible source and destination encoding
and xml escaping (the :xml option to String#encode), the resulting
string was broken, as it used the correct non-ASCII compatible
encoding, but contained data that was ASCII-compatible instead of
compatible with the string's encoding.

Work around this issue by detecting the case where both the
source and destination encoding are non-ASCII compatible, and
transcoding the source string from the non-ASCII compatible
encoding to UTF-8. The xml escaping code will correctly handle
the UTF-8 source string and the return the correctly encoded
and escaped value.

Fixes [Bug #12052]

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Add string encoding IBM720 alias CP720 (#3803)</title>
<updated>2020-11-22T13:23:40+00:00</updated>
<author>
<name>Lars Kanis</name>
<email>lars@greiz-reinsdorf.de</email>
</author>
<published>2020-11-22T13:23:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d403591b34e204a5937241025c62c877e579fbaf'/>
<id>d403591b34e204a5937241025c62c877e579fbaf</id>
<content type='text'>
The mapping table is generated from the ICU project:
  https://github.com/unicode-org/icu/blob/master/icu4c/source/data/mappings/ibm-720_P100-1997.ucm

Fixes bug 16233 : https://bugs.ruby-lang.org/issues/16233</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mapping table is generated from the ICU project:
  https://github.com/unicode-org/icu/blob/master/icu4c/source/data/mappings/ibm-720_P100-1997.ucm

Fixes bug 16233 : https://bugs.ruby-lang.org/issues/16233</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed symbol misused as ID</title>
<updated>2020-02-24T06:37:52+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-02-24T06:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8b6e2685a4b7c7de905f7ed60c02ef85e0724754'/>
<id>8b6e2685a4b7c7de905f7ed60c02ef85e0724754</id>
<content type='text'>
`rb_funcallv_public` and `rb_respond_to` require an `ID`, not a
`Symbol`.  [Bug #16649]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`rb_funcallv_public` and `rb_respond_to` require an `ID`, not a
`Symbol`.  [Bug #16649]
</pre>
</div>
</content>
</entry>
<entry>
<title>Added assertions for newline decorators</title>
<updated>2020-01-11T01:42:21+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-01-11T01:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8bb24712de04cfa8bb1dbfc0c3cee3de6eb4b40d'/>
<id>8bb24712de04cfa8bb1dbfc0c3cee3de6eb4b40d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add encoding conversion from/to CESU-8</title>
<updated>2019-07-14T01:58:50+00:00</updated>
<author>
<name>Martin Dürst</name>
<email>duerst@it.aoyama.ac.jp</email>
</author>
<published>2019-07-14T01:58:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=369ff79394765ce198ac7cee872a8c739d895aaa'/>
<id>369ff79394765ce198ac7cee872a8c739d895aaa</id>
<content type='text'>
Add encoding conversion (transcoding) from UTF-8 to CESU-8
and back. CESU-8 is an encoding similar to UTF-8, but encodes
codepoints above U+FFFF as two surrogates, these surrogates
again being encoded as if they were UTF-8 codepoints. This
preserves the same binary sorting order as in UTF-16. It is
also somewhat similar (although not exactly identical) to an
encoding used internally by Java.

This completes issue #15995.

enc/trans/cesu_8.trans: Add encoding conversion from/to CESU-8
test/ruby/test_transcode.rb: Add tests for above
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add encoding conversion (transcoding) from UTF-8 to CESU-8
and back. CESU-8 is an encoding similar to UTF-8, but encodes
codepoints above U+FFFF as two surrogates, these surrogates
again being encoded as if they were UTF-8 codepoints. This
preserves the same binary sorting order as in UTF-16. It is
also somewhat similar (although not exactly identical) to an
encoding used internally by Java.

This completes issue #15995.

enc/trans/cesu_8.trans: Add encoding conversion from/to CESU-8
test/ruby/test_transcode.rb: Add tests for above
</pre>
</div>
</content>
</entry>
<entry>
<title>Add FrozenError as a subclass of RuntimeError</title>
<updated>2017-12-12T00:46:34+00:00</updated>
<author>
<name>shyouhei</name>
<email>shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-12-12T00:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b57915eddc91ce0369ae8bcf82d8c4364f42ea05'/>
<id>b57915eddc91ce0369ae8bcf82d8c4364f42ea05</id>
<content type='text'>
FrozenError will be used instead of RuntimeError for exceptions
raised when there is an attempt to modify a frozen object. The
reason for this change is to differentiate exceptions related
to frozen objects from generic exceptions such as those generated
by Kernel#raise without an exception class.

From: Jeremy Evans &lt;code@jeremyevans.net&gt;
Signed-off-by: Urabe Shyouhei &lt;shyouhei@ruby-lang.org&gt;


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FrozenError will be used instead of RuntimeError for exceptions
raised when there is an attempt to modify a frozen object. The
reason for this change is to differentiate exceptions related
to frozen objects from generic exceptions such as those generated
by Kernel#raise without an exception class.

From: Jeremy Evans &lt;code@jeremyevans.net&gt;
Signed-off-by: Urabe Shyouhei &lt;shyouhei@ruby-lang.org&gt;


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
