Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jcodings
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9e8005fb3740
Choose a base ref
...
head repository: jruby/jcodings
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d664e34de181
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Dec 21, 2015

  1. update transcoder list

    lopex committed Dec 21, 2015
    Copy the full SHA
    8d8f99e View commit details
  2. Copy the full SHA
    60088a0 View commit details
  3. add new transcoder binary data

    lopex committed Dec 21, 2015
    Copy the full SHA
    d664e34 View commit details
Binary file added resources/tables/Transcoder_Ebcdic_ByteArray.bin
Binary file not shown.
Binary file added resources/tables/Transcoder_Ebcdic_WordArray.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion scripts/ExtractTranscoders.rb
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ def assert
transcoder_srcs = Dir["#{trans_path}/*.c"].reject{|f| f =~ /transdb/}

# newline.c generates into ruby root, for whatever reason
transcoder_srcs << "#{repo_path}/newline.c"
# transcoder_srcs << "#{repo_path}/newline.c" -- in 2.3 it's back in trans dir

transcoder_srcs.each do |f|
src = open(f).read
20 changes: 12 additions & 8 deletions src/org/jcodings/transcode/TranscoderList.java
Original file line number Diff line number Diff line change
@@ -37,6 +37,8 @@ final class TranscoderList {
{"GB12345", "UTF-8", null /*From_GB12345*/},
{"UTF-8", "GB2312", null /*To_GB2312*/},
{"UTF-8", "GB12345", null /*To_GB12345*/},
{"IBM037", "ISO-8859-1", null /*From_IBM037_to_ISO_8859_1*/},
{"ISO-8859-1", "IBM037", null /*From_ISO_8859_1_to_IBM037*/},
{"UTF8-DoCoMo", "UTF8-KDDI", null /*From_UTF8_DoCoMo_to_UTF8_KDDI*/},
{"UTF8-DoCoMo", "UTF8-SoftBank", null /*From_UTF8_DoCoMo_to_UTF8_SoftBank*/},
{"UTF8-DoCoMo", "UTF-8", null /*From_UTF8_DoCoMo*/},
@@ -93,6 +95,9 @@ final class TranscoderList {
{"EUC-KR", "UTF-8", null /*From_EUC_KR*/},
{"UTF-8", "CP949", null /*To_CP949*/},
{"CP949", "UTF-8", null /*From_CP949*/},
{"", "universal_newline", "Universal_newline"},
{"", "crlf_newline", null /*Crlf_newline*/},
{"", "cr_newline", null /*Cr_newline*/},
{"US-ASCII", "UTF-8", null /*From_US_ASCII*/},
{"UTF-8", "US-ASCII", null /*To_US_ASCII*/},
{"ASCII-8BIT", "UTF-8", null /*From_ASCII_8BIT*/},
@@ -212,10 +217,7 @@ final class TranscoderList {
{"UTF-16", "UTF-8", "From_UTF_16"},
{"UTF-32", "UTF-8", "From_UTF_32"},
{"UTF-8", "UTF-16", "To_UTF_16"},
{"UTF-8", "UTF-32", "To_UTF_32"},
{"", "universal_newline", "Universal_newline"},
{"", "crlf_newline", null /*Crlf_newline*/},
{"", "cr_newline", null /*Cr_newline*/}
{"UTF-8", "UTF-32", "To_UTF_32"}
};

static final GenericTranscoderEntry[] GENERIC_LIST = new GenericTranscoderEntry[] {
@@ -233,6 +235,8 @@ final class TranscoderList {
new GenericTranscoderEntry("GB12345", "UTF-8", 59848, "Chinese", 1, 2, 1, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("UTF-8", "GB2312", 96820, "Chinese", 1, 4, 2, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("UTF-8", "GB12345", 130816, "Chinese", 1, 4, 2, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("IBM037", "ISO-8859-1", 948, "Ebcdic", 1, 1, 1, AsciiCompatibility.DECODER, 0),
new GenericTranscoderEntry("ISO-8859-1", "IBM037", 1904, "Ebcdic", 1, 1, 1, AsciiCompatibility.ENCODER, 0),
new GenericTranscoderEntry("UTF8-DoCoMo", "UTF8-KDDI", 1176, "Emoji", 1, 4, 6, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("UTF8-DoCoMo", "UTF8-SoftBank", 2148, "Emoji", 1, 4, 6, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("UTF8-DoCoMo", "UTF-8", 2616, "Emoji", 1, 4, 4, AsciiCompatibility.CONVERTER, 0),
@@ -289,6 +293,9 @@ final class TranscoderList {
new GenericTranscoderEntry("EUC-KR", "UTF-8", 78500, "Korean", 1, 2, 1, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("UTF-8", "CP949", 126176, "Korean", 1, 4, 2, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("CP949", "UTF-8", 196644, "Korean", 1, 2, 1, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("", "universal_newline", 4, "Newline", 1, 1, 2, AsciiCompatibility.CONVERTER, 2),
new GenericTranscoderEntry("", "crlf_newline", 20, "Newline", 1, 1, 2, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("", "cr_newline", 36, "Newline", 1, 1, 1, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("US-ASCII", "UTF-8", 8, "SingleByte", 1, 1, 1, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("UTF-8", "US-ASCII", 132, "SingleByte", 1, 4, 1, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("ASCII-8BIT", "UTF-8", 148, "SingleByte", 1, 1, 1, AsciiCompatibility.CONVERTER, 0),
@@ -408,9 +415,6 @@ final class TranscoderList {
new GenericTranscoderEntry("UTF-16", "UTF-8", 276, "Utf1632", 2, 4, 4, AsciiCompatibility.DECODER, 1),
new GenericTranscoderEntry("UTF-32", "UTF-8", 300, "Utf1632", 4, 4, 4, AsciiCompatibility.DECODER, 1),
new GenericTranscoderEntry("UTF-8", "UTF-16", 416, "Utf1632", 1, 4, 4, AsciiCompatibility.ENCODER, 1),
new GenericTranscoderEntry("UTF-8", "UTF-32", 416, "Utf1632", 1, 4, 4, AsciiCompatibility.ENCODER, 1),
new GenericTranscoderEntry("", "universal_newline", 4, "Newline", 1, 1, 2, AsciiCompatibility.CONVERTER, 2),
new GenericTranscoderEntry("", "crlf_newline", 20, "Newline", 1, 1, 2, AsciiCompatibility.CONVERTER, 0),
new GenericTranscoderEntry("", "cr_newline", 36, "Newline", 1, 1, 1, AsciiCompatibility.CONVERTER, 0)
new GenericTranscoderEntry("UTF-8", "UTF-32", 416, "Utf1632", 1, 4, 4, AsciiCompatibility.ENCODER, 1)
};
}