[fpc-pascal] Unicode chars losing information
    Ryan Joseph 
    genericptr at gmail.com
       
    Sun Mar  7 18:45:12 CET 2021
    
    
  
> On Mar 7, 2021, at 10:21 AM, Ryan Joseph <genericptr at gmail.com> wrote:
> 
> I thought unicode strings "just worked" but maybe that's UTF-8 and the character I want is maybe UTF-16. What are you supposed to do then? UnicodeString knows how to print the full string so all the data is there but I can't index to get characters unless I know their size.
Since this looks like it could be complicated here is what I was actually trying to do with the FreeType library. This works for ASCII but broke down with those unicode chars. I'm confused now because you say the character are more than 2 bytes so I don't know what the actual size of an element is.
  for glyph in '⌘⌥⌫⇧^' do
    FT_Load_Char(m_face, ord(glyph), FT_LOAD_RENDER);
Regards,
	Ryan Joseph
    
    
More information about the fpc-pascal
mailing list