Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenquotes.git

Force output encoding, add 'un' as an unambiguous contraction

AuthorDave Jarvis <email>
Date2022-08-21 18:06:09 GMT-0700
Commit0e878a3c94f3eea26fd84dab3741639effdec3df
Parenteb469ec
src/main/java/com/whitemagicsoftware/keenquotes/app/KeenQuotes.java
import static java.lang.String.format;
import static java.lang.System.*;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static picocli.CommandLine.Help.Ansi.Style.*;
import static picocli.CommandLine.Help.ColorScheme;
private String convert( final Curler curler ) throws IOException {
- return curler.apply( new String( in.readAllBytes() ) );
+ return curler.apply( new String( in.readAllBytes(), UTF_8 ) );
}
src/main/java/com/whitemagicsoftware/keenquotes/parser/Contractions.java
"twould",
"twouldn",
+ // one
+ "un",
// have
"ve",
Delta4 lines added, 1 line removed, 3-line increase