Copyright symbol drives me crazy lazarus / 31-LCL ---------------------------------------------------------------------- Raul_ES · 2020-04-07 19:59 Hi, I am unable to see what I am doing wrong here and I've been several weeks trying to figure it out. Please, check this simple and clear line: 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 Label_copyrightNote.Caption := 'Copyright '+#0169+COPYRIGHT_DATES; This code will just concatenate the text 'copyright' with the ascii code for the (c) copyright symbol and a sitring variable that hold the copyright dates. It should work I said to my self. Well, surprise, it does not. The three screenshots belong to different forms in the same application. But only one prints the (c) symbol corretly, the rest prints just a ? symbol. I have checked the font being used, the codification of the label... I don't know what else. And I'm sure that there is a ridiculous easy explanation, but sorry I can't find it. Any idea? regards, ---------------------------------------------------------------------- Raul_ES · 2020-04-07 20:00 Correct symbol in this form: ---------------------------------------------------------------------- Raul_ES · 2020-04-07 20:07 Incorrect symbol again here. I am always using the same code. ---------------------------------------------------------------------- winni · 2020-04-07 20:15 Hi! In this forum and elsewhere where years of discussion that Lazarus is U T F 8 Take this sign © copy it and put as string into your source. #0169 is today an illegal UTF8-value. The copyright-sign value is U+00A9 = $C2A9 Winni ---------------------------------------------------------------------- sstvmaster · 2020-04-07 20:20 Or use AnsiToUTF8() or SysToUTF8() from unit LazUTF8. ---------------------------------------------------------------------- winni · 2020-04-07 20:21 Quote from: sstvmaster on April 07, 2020, 10:20:12 pmOr use AnsiToUTF8() or SysToUTF8() from unit LazUTF8. Yes - you are right. But that way they will never learn how UTF8 works. Wini ---------------------------------------------------------------------- korba812 · 2020-04-07 20:22 Copyright sign encoded in utf-8 is 0xC2 0xA9 http://www.fileformat.info/info/unicode/char/a9/index.htm 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 Label_copyrightNote.Caption := 'Copyright '+#$c2#$a9+COPYRIGHT_DATES;or just 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 Label_copyrightNote.Caption := 'Copyright ©'+COPYRIGHT_DATES; ---------------------------------------------------------------------- sstvmaster · 2020-04-07 20:27 @korba812 +1 ---------------------------------------------------------------------- Raul_ES · 2020-04-07 20:50 Thank you very much! I will use from now on utf only. but let me ask again, why +#0169+ actually works in one of my forms and not in the other ones? It's a real mistery