Add compatibility check for UTF8#370
Conversation
|
What about replacing all string representation of encodings by |
|
Sounds like a good idea! We should give it a try. |
|
@tobiasdiez great advice! pr.setEncoding(Charset.forName(reader.getEncoding()).name()); |
|
Please merge master: We did a mayor overhaul of the OpenDatabaseAction: Deleted code etc. |
|
@lenhard Glad this was helpful. I think the code would even further improve if the ParserResult (and maybe some other classes) doesn't hold the encoding as a string but as a |
Conflicts: src/main/java/net/sf/jabref/importer/OpenDatabaseAction.java
|
@koppor Done! |
Add compatibility check for UTF8
Instead of representing an encoding as a string we now use a Charset. This idea was already discussed in PR JabRef#370.
Instead of representing an encoding as a string we now use a Charset. This idea was already discussed in PR JabRef#370.
Instead of representing an encoding as a string we now use a Charset. This idea was already discussed in PR JabRef#370.
This PR attempts to fix #367
We have a bit of a problem.
UTF8came from these linesIt is set in this method call. That's the Java API. The
InputStreamReadersays that the proper name of the encoding isUTF8.My solution is an ugly compatibility hack in which we just insert the
-manually. Ugly, but works... What do you think?