aefcd05768487c06f9455fda78a5d758f5f4119b |
|
21-Feb-2018 |
Neil Fuller <nfuller@google.com> |
Ensure consistency around ignorable codepoints Since Android updated to ICU54 (Android 6.0), Android's CharsetEncoder would report canEncode() based on whether or not the input sequence would map to no bytes. This meant the behavior for "default ignorable codepoints" was inconsistent. If a CharBuffer only contained ignorable codepoints with no mapping it would report false, but true if they were part of a wider string. This change makes the behavior consistent: all default ignorable codepoints will now register canEncode() == true whether alone or as part of a sequence. canEncode() effectively becomes "If this sequence were encoded, would there be a mapping error?". This change contains a new test and a set of reference data for the new behavior for StandardCharsets. The reference data is generated from the new encoder behavior. See StandardCharsetsEncoderTest.Dumper for how the files were generated. Bug: 73550237 Test: CTS: run cts -m CtsLibcoreTestCases Merged-In: Id78a3259940e73c83f895a4d95e7c526176b06a6 Change-Id: Id78a3259940e73c83f895a4d95e7c526176b06a6 (cherry picked from commit 4e97e6145bbdcb2e997a2c1de3db2f42d9beb373)
|
4fd8ac297725190c6d81e9538b1faf7cfb0f5bb8 |
|
08-Feb-2011 |
Elliott Hughes <enh@google.com> |
Fix build. The *ICU classes shouldn't be public. Change-Id: I1ca75c696c52f75b70d6aef29888a5a48ef7b32a
|
3664d8839f0ba794f428119ee7f7304a66861da5 |
|
08-Feb-2011 |
Elliott Hughes <enh@google.com> |
Clean up the CharsetDecoder/CharsetEncoder implementation a bit more. Moving CharsetEncoderICU into java.nio.charset lets us use a cleaner workaround for the constructor-calling-abstract method API bug. Change-Id: I2312580b2c27711e9d4c88fe4dc057eec13c12e0
|