Strange behaviour of Lazarus. lazarus / 31-LCL ---------------------------------------------------------------------- Przemyslav · 2017-03-08 22:24 Hello everyone Today I discovered very strange issue / problem with Lazarus. I was working on my project and I have some Label, Buttons with Polish letter like "ł, ą, ó, ś...": https://s8.postimg.org/lohad7wid/before.png It was all OK. I saved and closed my project. After 30 minutes later I open project and I saw: https://s8.postimg.org/hqu0nt9p1/aftre.png Something terrible happened with my font Where are my polish letters? My default Charset is: DEFAULT_CHARSET in properties. Of course after I compiled my project in open exe I have the same problem. What is going on? ---------------------------------------------------------------------- Thaddy · 2017-03-09 06:33 The Lazarus editors themselves are UTF8, but the default_charset is the OS charset. So the project properties are saved in the OS charset (CP_ACP?). Set the charset to unicode ( or maybe to eastern european) explicitly. ---------------------------------------------------------------------- Przemyslav · 2017-03-09 20:12 I changed every Label, Memo settings to UNICODE, but I have the same situation. ---------------------------------------------------------------------- GAN · 2017-03-10 02:22 Hi, what operating system do you use? I had a similar problem. ---------------------------------------------------------------------- Przemyslav · 2017-03-13 21:15 Sorry, It doesn't work also :/ My system is Windows 10 Home x64. I added my source files. Could you look? My source / program: http://www112.zippyshare.com/v/OvNofU4L/file.html Thank you for your help I have no idea what wrong is with this project :/ I uses the newest Lazarus. Przemek ---------------------------------------------------------------------- wp · 2017-03-13 22:00 Your project looks correct. The source files are UTF8 which is correct. What happened during the 30 minutes after you closed the project and before you reopened it again? Did you load source files into another editor which could have corrupted the encoding? If you now edit the label texts to replace the wrong characters and save and reload again do the labels remain correct or are they corrupted again? ---------------------------------------------------------------------- Przemyslav · 2017-03-13 22:24 Quote from: wp on March 13, 2017, 11:00:34 pmYour project looks correct. The source files are UTF8 which is correct. What happened during the 30 minutes after you closed the project and before you reopened it again? Did you load source files into another editor which could have corrupted the encoding? If you now edit the label texts to replace the wrong characters and save and reload again do the labels remain correct or are they corrupted again? Thanks for looking 1. Closed files are OK. But when I want to open them in Lazarus the are changing. For example: Before - OK files with word: Pikietaż: 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 object Form1: TForm1  Left = 665  Height = 797  Top = 225  Width = 1397  BorderIcons = [biSystemMenu, biMinimize]  BorderStyle = bsSingle  Caption = 'Pikietaż 3 3.0.0.3'  ClientHeight = 777  ClientWidth = 1397  Font.Height = 14  Font.Name = 'Default'  Icon.Data = { After - when project is opened in Lazarus - wrong word: PikietaĹĽ 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 object Form1: TForm1  Left = 381  Height = 797  Top = 180  Width = 1397  BorderIcons = [biSystemMenu, biMinimize]  BorderStyle = bsSingle  Caption = 'PikietaĹĽ 3 3.0.0.3'  ClientHeight = 777  ClientWidth = 1397  Font.Height = 14  Font.Name = 'Default'  Icon.Data = { 2. QuoteDid you load source files into another editor which could have corrupted the encoding? No I only use Lazarus editor. 3. 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 If you now edit the label texts to replace the wrong characters and save and reload again do the labels remain correct or are they corrupted again? I did this many times. Sometimes I have feeling that it's OK when computer is ON. But if I my computer is OFF, next ON and I want to work on project, I have this problem. ---------------------------------------------------------------------- wp · 2017-03-14 08:05 The files that you uploaded seem to contain the error already: After downloading again and opening unit.lfm in Notepad++ I see " Caption 'PikietaĹĽ 3 3.0.0.3'". Could you please upload the original (=correct) files? And, please, don't use an external server, your files will be gone after a while and users visiting this thread later will not be able to load the project any more. Instead, use the "Attachments and other options" below the input field of the forum editor to upload the zip file to the forum. Remove the lib folder as well as any compiler- generated files from your zip, these files are not needed to compile the project and they will just blow up the upload size. Essentially, the zip should only contain pas, lfm, lpi and lpr files (plus some data files -- but this is not required in your case). What happens if you create a new project with just a label containing Polish characters? Does it show the same problem? Find out the directory which contains the Lazarus settings. In Windows 10 this is normally c:\Users\\AppData\Local\Lazarus. Or, if you have a secondary installation, you find the name of the settings folder in the file Lazarus.cfg in the directory containing Lazarus.exe. Close Lazarus, rename the settings folder and restart Lazarus again - this will create a new settings folder with original default settings. Does the error persist? (To restore the old settings just delete the new settings folder and rename the original one back). ---------------------------------------------------------------------- Przemyslav · 2017-03-16 02:15 I solved the problem. I created a new project with "empty" files like: *.lfm, *.pas. Second I copied content of my "wrong" files to the new files. I saved, reopen project and voila everything it's OK Every file has got proper coding in UTF-8. Big thanks for your help. I am grateful