Use charset to properly adhere to Javadoc contract.

Closes #602.

@swankjesse 
... and return the charset.