Application Mobile in Delphi Error when load from strream


By elcharlie I’m doing my first application for mobile in delphi and I have a problem and can not fix it.
I have a procedure running that I load a csv file from the resorce.
When I throw this procedure, on a mobile device (I could only test it on Android) I get this error: ‘No mapping for the Unicode character exists in the Target multi-byte code page’, no error in 32-bit Windows.
Can anyone help me?
Thank you.

Here is the code, Rad Studio XE6:

procedure TContactos.LoadFromResource;
FicheroEntero, Linea: TStringList;
rs: TResourceStream;
I, pos: Integer;
contacto : TContacto;
FicheroEntero := TStringList.Create;
Linea := TStringList.Create;
rs := TResourceStream.Create(HInstance,’clientes_csv’, RT_RCDATA);
FicheroEntero.LoadFromStream(rs); //Here enter in Exception
for I := 1 to FicheroEntero.Count-1 do
Linea.Delimiter := ‘;’;
Linea.StrictDelimiter := True;
Linea.DelimitedText := FicheroEntero[I];
if Linea.Count >= 2 then
contacto := TContacto.Create;
pos := GDListaContactos.Add(contacto);
contacto.Posicion := pos;
contacto.Codigo := StrToInt(Trim(Copy(Linea[0], 1 ,Length(Linea[0]))));
…read more

Via: StackOverflow

Comments are closed.