-1

I use Delphi 2009. I receive a text as String that looks like 'Визгунов (ранний) {VHS}'. Using online decoders, I was able to determine that it's actually Win-1251 codepage.

What should I do to restore it back to normal, in other words to make it readable again?

Max Smith
  • 395
  • 1
  • 2
  • 13
  • 1
    How are you receiving the text to begin with? What is the text *supposed* to look like? Please provide more detail, preferrably a [mcve]. – Remy Lebeau May 10 '21 at 18:55

1 Answers1

1
var s: string;
    rbs: RawByteString;
begin
    rbs := Utf8ToAnsi('Визгунов (ранний) {VHS}');
    SetCodePage(rbs, 1251, false);
    s := string(rbs); // s = 'Визгунов (ранний) {VHS}'
end;
dwrbudr
  • 607
  • 4
  • 8