The maxLength configuration option to OO.ui.TextInputWidget is documented as "Maximum number of characters allowed in the input." However, what it actually does is set the maxLength attribute on the HTML <input> element, which according to HTML5 specifies the maximum length in "code units".
This makes a difference if someone is entering characters from outside the Unicode Basic Multilingual Plane, as in UTF-16 these characters consist of two code units.
I'll leave it to you to decide whether the better fix is to stop using the HTML5 maxLength attribute in favor of manual validation or to simply update the documentation to reference code units rather than characters.