Browse Source

* Better detection of resource format.

Michaël Van Canneyt 3 years ago
parent
commit
0f909fc3b4
1 changed files with 5 additions and 2 deletions
  1. 5 2
      packages/rtl/classes.pas

+ 5 - 2
packages/rtl/classes.pas

@@ -1671,9 +1671,12 @@ var
   S : String;
 
 begin
-  if aInfo.encoding<>'base64' then
+  if aInfo.encoding='base64' then
+    S:=atob(aInfo.Data)
+  else if (aInfo.Encoding='text') then
+    s:=aInfo.Data
+  else
     Raise ENotSupportedException.CreateFmt(SErrResourceNotBase64,[aInfo.name]);
-  S:=atob(aInfo.Data);
   Ptr:=StringToBuffer(S, length(S));
   SetPointer(Ptr,Ptr.byteLength);
 end;