I happen to get 14 in my sbt console, where my sbt script specifies -Dfile.encoding=UTF8
.
Your new String(bytes)
uses the default encoding. You can supply a charset to the constructor.
Second guess:
You have different versions of the -codec library in Test
configuration and otherwise.
When I bump the version back to 1.1, I also get 15.
To be honest, that was going to be my second guess originally. There is a lot of history in the -codec project, so incompatibilities or behavior changes are not amazing. Presumably the behavior that elicits the number 14 is more conforming.
It's also not amazing that a "common" dependency appears twice in dependency trees.