How To Display Greek Numerals in 'Application' TEdit object? lazarus / 31-LCL ---------------------------------------------------------------------- -Caiman- · 2019-01-07 19:04 Hello guys, I already asked you how to display Greek numerals in the console (thx for help btw.) : http://forum.lazarus- ide.org/index.php/topic,43739.0.html But now I cannot find the way to display UNICODEstring in TEdit object because it supports only String to display. Is there any convert function like IntToStr or library to add to make it work? Thx for answers! ---------------------------------------------------------------------- CCRDude · 2019-01-07 19:15 Are you looking for the UTF8Encode() function maybe? ---------------------------------------------------------------------- -Caiman- · 2019-01-07 19:23 I tried it now, no warning messege now but still not worked. Am I using it right? ---------------------------------------------------------------------- balazsszekely · 2019-01-07 19:34 With fpc3.0.0 + a simple assignment should be enough: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  UStr: UnicodeString;begin   Edit1.Text := UStr;end;Are you sure that SYM is an unicodestring? Can you post a small demo application? ---------------------------------------------------------------------- lucamar · 2019-01-07 19:39 It should be converted automatically, when you assign a UnicodeString to a String; i.e. this should work without more ado: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure SetTextForEdit(AnEdit: TEdit; const AText: UnicodeString);begin  AnEdit.Text := AText;end. I have just tested something similar (only using an Spanish test string) and it does work. ETA: Ahh ... yeah, what GetMem said. ---------------------------------------------------------------------- -Caiman- · 2019-01-08 12:51 Quote from: GetMem on January 07, 2019, 08:34:11 pmWith fpc3.0.0 + a simple assignment should be enough: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  UStr: UnicodeString;begin   Edit1.Text := UStr;end;Are you sure that SYM is an unicodestring? Can you post a small demo application? Potential data loss. Still not working. Yes, my SYM is UNICODEstring but its not const ---------------------------------------------------------------------- Bart · 2019-01-08 13:08 Your font needs to be able to display the characters in question (not all fonts support that). If you are sure that UStr is a WideString (you're on Windows I see) / UnicodeString then Utf16ToUTf8(Ustr) should work. Do you have DisableUTF8RTL defined in your project options? If so, then assigning a UnicodeString to a String may indeed cause data loss: your current Windows codepage MUST support the character in it's ANSI codepage. Bart ---------------------------------------------------------------------- -Caiman- · 2019-01-08 13:41 WORKS! Only added {$codepage utf8}  in the begining. Thx guys for replies! ---------------------------------------------------------------------- balazsszekely · 2019-01-08 14:01 QuoteOnly added {$codepage utf8}  in the begining. Thx guys for replies!It means you tried to assing a string literal to an unicodestring. That's not needed, you can use a regular string for that. UnicodeString/WideString is useful for api calls.