You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/07/16 12:24:05 UTC
[commons-imaging] branch master updated (d55ecaab -> 539e27b4)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
from d55ecaab Correct javadoc space character
new 468be001 Format tweak
new 539e27b4 Use a JRE built-in Charset instead of a magic string
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
[commons-imaging] 01/02: Format tweak
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
commit 468be001e402895c24aad9dad84a20966a05800e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 16 08:18:53 2023 -0400
Format tweak
---
.../apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java b/src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java
index b1d2001a..426b7c1c 100644
--- a/src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java
+++ b/src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java
@@ -35,6 +35,7 @@ import org.apache.commons.imaging.internal.Debug;
* the non-null-terminated text in an unknown byte order.
*/
public final class TagInfoGpsText extends TagInfo {
+
private static final class TextEncoding {
final byte[] prefix;
public final String encodingName;
@@ -44,6 +45,7 @@ public final class TagInfoGpsText extends TagInfo {
this.encodingName = encodingName;
}
}
+
private static final TagInfoGpsText.TextEncoding TEXT_ENCODING_ASCII = new TextEncoding(
new byte[] { 0x41, 0x53, 0x43, 0x49, 0x49, 0x00, 0x00, 0x00, },
"US-ASCII"); // ITU-T T.50 IA5
[commons-imaging] 02/02: Use a JRE built-in Charset instead of a magic string
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
commit 539e27b422415816b51fe39727a1ec934e37b2b6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 16 08:24:00 2023 -0400
Use a JRE built-in Charset instead of a magic string
---
.../commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java b/src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java
index 426b7c1c..e383c9dc 100644
--- a/src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java
+++ b/src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoGpsText.java
@@ -48,20 +48,20 @@ public final class TagInfoGpsText extends TagInfo {
private static final TagInfoGpsText.TextEncoding TEXT_ENCODING_ASCII = new TextEncoding(
new byte[] { 0x41, 0x53, 0x43, 0x49, 0x49, 0x00, 0x00, 0x00, },
- "US-ASCII"); // ITU-T T.50 IA5
+ StandardCharsets.US_ASCII.name()); // ITU-T T.50 IA5
private static final TagInfoGpsText.TextEncoding TEXT_ENCODING_JIS = new TextEncoding(
new byte[] { 0x4A, 0x49, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, },
"JIS"); // JIS X208-1990
private static final TagInfoGpsText.TextEncoding TEXT_ENCODING_UNICODE_LE = new TextEncoding(
new byte[] { 0x55, 0x4E, 0x49, 0x43, 0x4F, 0x44, 0x45, 0x00},
- "UTF-16LE"); // Unicode Standard
+ StandardCharsets.UTF_16LE.name()); // Unicode Standard
private static final TagInfoGpsText.TextEncoding TEXT_ENCODING_UNICODE_BE = new TextEncoding(
new byte[] { 0x55, 0x4E, 0x49, 0x43, 0x4F, 0x44, 0x45, 0x00},
- "UTF-16BE"); // Unicode Standard
+ StandardCharsets.UTF_16BE.name()); // Unicode Standard
private static final TagInfoGpsText.TextEncoding TEXT_ENCODING_UNDEFINED = new TextEncoding(
new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
// Try to interpret an undefined text as ISO-8859-1 (Latin)
- "ISO-8859-1"); // Undefined
+ StandardCharsets.ISO_8859_1.name()); // Undefined
private static final TagInfoGpsText.TextEncoding[] TEXT_ENCODINGS = {
TEXT_ENCODING_ASCII, //