Encodes a Char into a ByteArray using the given Encoding and ByteOrder.
the Char to encode.
the ByteOrder to use. For Encoding where Encoding.byteSize is 1, this can be ignored.