Check that the prefix is not mixed-case (?) and convert to lower case before encoding. Otherwise, the encoded string may be deemed invalid by `decode`.