No mapping for the unicode character exists in the target - byte code page
Masters please teach you???
I good reduction for pictures after decoding
CodePudding user response:
I use Delphi2010 encapsulates the decoding function, XE10 didn't try,
The class function Base64DecodeImageFile (fileName: string; EncodeStr: AnsiString) : Boolean;
Var
BTS: TBytes;
Ms: TMemoryStream;
Decoder: TIdDeCoderMIME;
The begin
Decoder:=TIdDeCoderMIME. Create (nil);
Ms:=TMemoryStream. The Create ();
Try
BTS:=decoder. DecodeBytes (encodeStr);
Ms. Write (BTS [0], Length (BTS));
Ms. SaveToFile (fileName);
Result:=true;
Except,
Result:=false;
end;
Decoder. Free;
Ms. The Free;
end;