Is the encoding name UTF8 or UTF-8?

httpclient, java

Solution

Easier to use StandardCharsets.UTF_8 as it saves you having to deal with UnsupportedEncodingExceptions

Problem

Some httpclient requires me to give a string charsetµ. I am wondering whether to give it UTF8 or utf8 or UTF-8? Especially when calling Charset.forName(enc)

Original source