Carcter encoding error when saving by memo or Richmemo lazarus / 31-LCL ---------------------------------------------------------------------- aacs · 2019-01-21 10:05 Error encoding when saving from memo or Richmemo to a text file,. txt. doc,. Odt Strangers characters In Portuguese, the characters á é í ó ú Exite a solution or some adjustment in Lazarus for this problem, thank you --------------------------------- I do not speak English, I am using Google Translator, sorry for any pronunciation error unit Unit1; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls; type   { TForm1 }   TForm1 = class(TForm)     Button1: TButton;     Button2: TButton;     Memo1: TMemo;     procedure Button1Click(Sender: TObject);     procedure Button2Click(Sender: TObject);   private   public   end; var   Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);   begin Memo1.Lines.LoadFromFile('Textos padroes\alma\alma1.odt'); // RichMemo1.Lines.LoadFromFile('Textos padroes\alma\alma1.doc') end; procedure TForm1.Button2Click(Sender: TObject); begin Memo1.Lines.SaveToFile('Textos padroes\alma\alma1.odt');  //RichMemo1.Lines.SaveToFile('Textos padroes\alma\alma1.doc') end; end. ---------------------------------------------------------------------- lucamar · 2019-01-21 10:32 When you open a text file in Open/LibreOffice there should appear a dialog like the one in the attached image (in your language; mine is in Spanish). Make sure you select the correct codification in the first box. One other (trivial) thing: It is considered bad "manners" to use an extension which is already in use for other thing, so instead of .ODT or .DOC you should use .TXT for plain-text files. ---------------------------------------------------------------------- aacs · 2019-01-27 08:37 Sorry for bad English / Portuguese translation made by microsoft bing I misunderstood, sorry. I did not find this option in LibreOffice 5.4.3.2 If you have a code to write to lazarus, I think it would be simpler to convert, for simple texts I already know as .txt     I need it to be properly encoded, if possible, (.doc) or (.odt) thank you