Allow EXIFReader to use other encodings than ASCII/UTF-8
See original GitHub issueI try to read a bunch of old tiff files encoded on an old windows system. All ascii headers are encoded in “windows-1252”/“Cp1250” but EXIFReader
doesn’t provide any ability to override the default encoding: UTF-8.
As far as I can see the issue is located in line 315 (Version 3.3.2):
return StringUtil.decode(ascii, 0, len, "UTF-8");
We could add two constructors to EXIFReader:
public EXIFReader() {
this(Charset.forName("UTF-8"));
}
public EXIFReader(Charset charset) {
this.charset = charset;
}
WDYT?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Choosing & applying a character encoding - W3C
Why use UTF-8? An HTML page can only be in one encoding. You cannot encode different parts of a document in different encodings....
Read more >Character Encodings in Linux: ASCII, UTF-8 and ISO-8859
ISO/IEC 8859 sought to fix this problem by utilizing the eighth bit in an 8-bit byte to allow positions for another 96 printable...
Read more >Unicode, UTF-8, and ASCII encodings made easy - Medium
First there was the C programming language, then there was ASCII. ... Different people would use different characters for the same numbers.
Read more >Unicode, in friendly terms: ASCII, UTF-8, code ... - YouTube
Unicode and character encoding might seem like a tricky topic, ... To Store Characters Using ASCII 01:38 What About All The Other Languages?...
Read more >exifreader - npm
Library that parses Exif metadata in images.. Latest version: 4.9.0, last published: 11 hours ago. Start using exifreader in your project by running...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No worries, I’ll continue to use UTF-8. 😀
– Harald K
Ah, @haraldk , you make a good point. You’re right, there is less probability in this situation that ISO-8859-1 would be the correct eight-bit encoding. Java properties files as you noted were originally defined to use ISO-8859-1.
I guess my bigger fear was that you might switch to only supporting ASCII, so I’m glad that’s not the case. 😄