Displaying Unicode Plane 1 Characters in LCL COntrols lazarus / 13-General ---------------------------------------------------------------------- Milla · 2009-01-28 13:36 I am trying to display Unicode Plane 1 Characters in LCL Controls.  I am using Lazarus 0.9.26 on Windows 2000 SP4 and the Win32 interface.  I am using the following Function to convert a Unicode CodePoint to UTF8 (adapted from http://developers.sun.com/dev/gadc/technicalpublica tions/articles/utf8.html) Code: [Select]Function CodePointToUTF8 (CodePoint : Integer) : String; Begin Case CodePoint of $000000..$00007F : Result := Chr (CodePoint); $000080..$0007FF : Result := Chr (CodePoint Shr 6 or $C0) + Chr (CodePoint And $3F or $80); $000800..$00FFFF : Result := Chr (CodePoint Shr 12 or $E0) + Chr (CodePoint Shr 6 And $3F or $80) + Chr (CodePoint And $3F or $80); $010000..$10FFFF : Result := Chr (CodePoint Shr 18 or $F0) + Chr (CodePoint Shr 12 And $3F or $80) + Chr (CodePoint Shr 6 And $3F or $80) + Chr (CodePoint And $3F or $80); Else Result := ''; End; End; This works fine for Plane 0 CodePoints, but does not display anything for higher Planes.  Is there a way of showing these characters? ---------------------------------------------------------------------- theo · 2009-01-28 15:37 http://lazarus-ccr.sourceforge.net/docs/lcl/lclproc/unicodetoutf8.html ---------------------------------------------------------------------- Milla · 2009-01-29 10:43 Thanks Theo,  I have changed my application to use the inbuilt function. However, I am still getting problems displaying higher plane characters.  After some investigation, I discovered that the Win32 widgetset is using the CESU-8 encoding.  I have added two UnicodeToCESU8 functions to LCLProc and submitted a patch.