02-01-2021, 01:34 PM
If a UTF-8 string contains a curled apostrophe, it's stored as "\xe2\x80\x99" so a string like "Joe’s" returns a length or size of 7, not 5. The same happens for special characters like en dashes and thin spaces. This is a problem because I end up allocating two extra [garbage] character spaces when setting a text range end offset.
Could a function be added to CORE's Strings class to return a string length taking these extended characters into account?
Thanks! -- Rick
Could a function be added to CORE's Strings class to return a string length taking these extended characters into account?
Thanks! -- Rick