[Git][java-team/jcodings][master] 4 commits: add utf8 -> utf-8 alias

Hideki Yamane gitlab at salsa.debian.org
Thu Oct 3 17:19:47 BST 2019



Hideki Yamane pushed to branch master at Debian Java Maintainers / jcodings


Commits:
ead98826 by Marcin Mielzynski at 2019-07-23T15:21:43Z
add utf8 -> utf-8 alias

- - - - -
4cbf09e6 by Charles Oliver Nutter at 2019-10-02T01:42:18Z
Avoid calling Java 9+ version of *Buffer.position.

Fixes #27.

- - - - -
3709fc51 by Charles Oliver Nutter at 2019-10-02T01:43:34Z
[maven-release-plugin] prepare release jcodings-1.0.45

- - - - -
c5ded8fe by Charles Oliver Nutter at 2019-10-02T01:43:40Z
[maven-release-plugin] prepare for next development iteration

- - - - -


4 changed files:

- pom.xml
- scripts/generate.rb
- src/org/jcodings/EncodingList.java
- src/org/jcodings/spi/ISO_8859_16.java


Changes:

=====================================
pom.xml
=====================================
@@ -3,7 +3,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.jruby.jcodings</groupId>
   <artifactId>jcodings</artifactId>
-  <version>1.0.45-SNAPSHOT</version>
+  <version>1.0.46-SNAPSHOT</version>
   <name>JCodings</name>
   <description>Byte based encoding support library for java</description>
   <parent>


=====================================
scripts/generate.rb
=====================================
@@ -80,6 +80,7 @@ def generate_encoding_list
 
     defines, other = open("#{REPO_PATH}/encdb.h").read.tr('()', '').scan(/ENC_([A-Z_]+)(.*?);/m).partition { |a, b| a =~ /DEFINE/ }
     other << ["ALIAS", "\"MS932\", \"Windows-31J\""]
+    other << ["ALIAS", "\"UTF8\", \"UTF-8\""]
 
     open("#{SRC_DIR}/EncodingList.java", "wb") { |f| f << open("EncodingListTemplate.java", "rb").read.
         sub(/%\{defines\}/, defines.map { |cmd, name| "#{INDENT*2}EncodingDB.declare(#{name}, \"#{enc_map[name[/[^"]+/]] || (raise 'class not found for encoding ' + name)}\");" }.join("\n")).


=====================================
src/org/jcodings/EncodingList.java
=====================================
@@ -194,6 +194,7 @@ final class EncodingList {
         EncodingDB.replicate("UTF8-SoftBank", "UTF-8");
         EncodingDB.replicate("SJIS-SoftBank", "Windows-31J");
         EncodingDB.alias("MS932", "Windows-31J");
+        EncodingDB.alias("UTF8", "UTF-8");
     }
 
     public static Encoding getInstance(String name) {


=====================================
src/org/jcodings/spi/ISO_8859_16.java
=====================================
@@ -20,6 +20,7 @@
 
 package org.jcodings.spi;
 
+import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
 import java.nio.charset.Charset;
@@ -174,7 +175,7 @@ public class ISO_8859_16 extends Charset {
 
                 if (replace != null) {
                     if (out.remaining() < replace.length) {
-                        in.position(in.position() - 1);
+                        ((Buffer) in).position(in.position() - 1);
                         return CoderResult.OVERFLOW;
                     } else {
                         out.put(replace);



View it on GitLab: https://salsa.debian.org/java-team/jcodings/compare/8e09c6caab59f9a0b9760e57d2708eea185c2de1...c5ded8fe942e21a9cd95b42516aac98702e2f68e

-- 
View it on GitLab: https://salsa.debian.org/java-team/jcodings/compare/8e09c6caab59f9a0b9760e57d2708eea185c2de1...c5ded8fe942e21a9cd95b42516aac98702e2f68e
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20191003/bb5cf52e/attachment.html>


More information about the pkg-java-commits mailing list