Fix edge-case issues with enc_lc() and enc_uc(). The destination
size is now buffer size, not string length.