How do I convert from '\342\204\226' (octal), 0xE2 0x84 0x96 (hex), to '№' character in Lazarus?
I can use notation edit3.caption:=#$E2#$84#$96 for constants, but I need it to work for variables. What function should I use?
Handling letters is easy:
var r1, r2: integer
begin
edit3.caption:=#$D0#$A0;
edit3.caption:=chr(r1)+chr(r2);
end;
both put expected 'Р' into the edit control.
Chr(r1)+Chr(r2)+Chr(r3) produces some unexpected symbol.
Seems the unicode value for that char is $2116, which is within the BMP, so a cast to widechar works:
or using chr:
if you have trouble with variables, try making r1..r3 of type BYTE.