Closed jonahzheng closed 2 years ago
I added two functions WriteStringUTF8 and WriteBytes. Could you please try them?
` type TForm3 = class(TForm) AdTerminal1: TAdTerminal; AdVT100Emulator1: TAdVT100Emulator; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form3: TForm3;
implementation
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject); begin AdTerminal1.WriteStringUTF8(#$1B'[0m'#$1B'[01;34m你好'#$1B'[0mbbb'#$D#$A); end;
end. `
I looked at the TAdTerminal component and it seems that it is AnsiString based. Writing non ANSI chars is not possible.
Yes, but I'm thinking about converting to Unicode. A project needs to display Unicode text. Do you have any suggestions?
You have to replace all casts like string(AnsiString) and work with TBytes instead. This is a lot of work and would not be backward compatible.
Does this make sense fur such an old library?
Thank you for your advice. You're right. I'll find another solution
AdTerminal1.WriteString(#$1B'[0m'#$1B'[01;34m你好'#$1B'[0mbbb'#$D#$A);![U7VZ~2UYAP~OLO03ST6(M~7](https://user-images.githubusercontent.com/5125282/143868126-91985cdd-07c1-476e-adbc-4b7106c81bd5.png)