Updated: Comment #N
In many cases, transliterating one character can result in multiple characters of output. For instance, you might transliterate ö to oe in German.
If a caller of transliteration methods needs to limit the length of the resulting string from transliterating a string that contained ö somewhere in the middle, they might not want to split between the o and the e in the output. However, they would not have any way to know where it was and wasn't OK to truncate.
Therefore, it would be useful if the transliterate methods themselves had an optional maximum length parameter, which would ensure the return value was less than this length, split on the boundary between transliterations of individual characters.
Add an optional max_length parameter, which would return this length or fewer characters, ensuring that the full transliteration of each character (rather than partials) got into the return value. Callers who don't care about splitting on these boundaries could call the function without this parameter, and they could then truncate their output after the fact.
Add the parameter. Write a test that verifies it works.
User interface changes
New optional parameter to the transliteration methods, with backwards-compatible behavior (no truncation).
Original report by alippai
As the transliteration can differ in the output string length from the input we should provide a maxlength parameter.
E.g.: I think we shouldn't split "oe" from ö->oe conversion in German, if we limit the outputs length later.