The API (i.e Windows) does not matter... It's for the LCL/WS to adapt the value so it can go to the API. Also the API is also qt, gtk, cocoa ....
The property is expected to hold a single "character". The LCL uses Utf8.
So, I say, the property should be TUtf8Char.
As for any limitation to what can be set to the property:
- Some checks (such as the byte sequence to be valid utf8) can be done in the property setter.
- Subset checks may depend... If some OS accept a bigger set of chars.... Then that may be a runtime check, with some fallback, or some other solution.
Of course, the smallest common subset can be chosen, but what if the next WS to be added has a smaller subset?
Yes. And all this is actually what I said in the first place, isn't it?
Yes!! You are right. In this case the correct condition is:
UTF16Length is 1 to fit in WPARAM.
No, the correct condition is UTF8Length = 1.
Because UTF8Length = 1 does not guarantee UTF16Length is not 2. In another way, it is limited to UCS-2.
You are wrong. UTF8 covers whole unicode, all code points. It is not limited to ucs-2 subset.
LCL works with utf8 and, when needed, translates to what underlying widget api expects (in win widgetset it is utf16, in qt and gtk it is utf8, in any case we are by no means limited to ucs2).