Template:UTF-8/doc

Usage
Takes a single Unicode code point and returns the UTF-8 byte encoding.

Code Point - a Unicode code point scalar value, without the "U+".

Base - template returns UTF-8 bytes in upper case hexadecimal by default. Base = Dec or 10 outputs decimal values for UTF-8 bytes. Base = LChex, LC16, Lower Case Hex, or Lower Case 16 will output hex codes in lower case.

All inputs are case insensitive.

Technical
This template makes use of the following sub-templates:


 * - calls other sub templates, based on options and the format of the UTF-8 sequence
 * - the last byte of multi-byte UTF-8 sequences, and the only byte of a single-byte UTF-8 sequence.
 * - the first byte of two-byte sequences, and second to last of 3- and 4-byte UTF-8 sequences.
 * - the first byte of three-byte sequences, and the second byte of 4-byte UTF-8 sequences.
 * - the first byte of four-byte sequences.

This template is dependent on the following transcluded templates:



and the magic words / parser functions padleft:, #ifexpr:, #expr:, #switch:, uc:, and lc:.