Whats the difference between UTF-8 and utf8?
UTF-8 is the official standard. utf8 is Perl’s way of being liberal in what it accepts. If you have to communicate with things that aren’t so liberal, you may want to consider using UTF-8. If you have to communicate with things that are too liberal, you may have to use utf8. The full explanation is in Encode. UTF-8 is internally known as utf-8-strict. The tutorial uses UTF-8 consistently, even where utf8 is actually used internally, because the distinction can be hard to make, and is mostly irrelevant. For example, utf8 can be used for code points that don’t exist in Unicode, like 9999999, but if you encode that to UTF-8, you get a substitution character (by default; see “Handling Malformed Data” in Encode for more ways of dealing with this.) Okay, if you insist: the “internal format” is utf8, not UTF-8.