The official registry of encodings defines the names as case-insensitive and the spelling as UTF-8 (UTF8 isn’t even a valid alias). It is highly unlikely that any software that can deal with UTF-8 would not recognize the name UTF-8. So in all places, it is important to use UTF-8 and not UTF8.
Since the names are case-insensitive, documentation may use any casing. Software that imposes case restrictions on them would be seriously broken, and I don’t see why would assume that such software exists. Variation in documentation does not mean that some specific casing of letters must be used.
总结:
1、不区分大小写
2、utf8与UTF8是错误的
3、utf-8与UTF-8是正确的