[WIP] "abstract_ui" fixes and improvements

FWIW I noticed these things while prototyping a UI in python
The trans_special comments says only 6 bytes are required, but I think your'e right, if it combines a modifier with a multibyte character then up to 9 bytes can be returned