PHP -> JSON ->Zlib -> Delphi XE7 [win32 -> work | android -> No mapping ] [Edit]

Мy program for android should get data from the server as yson when to perform under vindovs works, and in android error, please help!

PHP:
{code}
$err = array();
$data = array('id'=>1,'name'=>'test','info'=>'1234');
$inf = array('data' => $data ,'error' => $err);
$json = json_encode($inf);
$json = gzencode(trim(preg_replace('/\s+/',' ',$json )),9);
header('Content-Encoding: gzip');
header("content-type: text/html; charset: UTF-8");
header("cache-control: must-revalidate");
header("expires: ".gmdate("D, d M Y H:i:s",time()+60)." GMT" );
header('Content-Length: ' . strlen( $json ) );
header('Vary: Accept-Encoding');
echo $json;
{code} 

Delphi XE7:

{code}
    http:= TIdHTTP.Create();
    http.ConnectTimeout:= 30000;
    http.Compressor:= TIdCompressorZLib.Create();
    cook:= TIdSSLIOHandlerSocketOpenSSL.Create();
    http.IOHandler:= cook;

    LoginInfo := TStringList.Create;
    Response := TStringStream.Create('');
    LoginInfo.Add('cmd=get');
    http.Post('https://site/api/get.php',LoginInfo,Response);
    http.Disconnect;
    data:= Response.DataString;
    Memo1.Lines.Add(data);
{code}

Empirically established that an error occurs in *data:= Response.DataString;*

P.S
The same problem found on the _http://stackoverflow.com/questions/24652341/no-mapping-for-the-unicode-character-exists-in-the-target-multi-byte-code-page/29664299#29664299_ and the author said that to work, but I do not work, grateful for the help!

Edited by: Andri Diuk on Apr 16, 2015 2:53 AM
0
Andri
4/16/2015 9:54:28 AM
embarcadero.delphi.firemonkey 4901 articles. 4 followers. Follow

0 Replies
1171 Views

Similar Articles

[PageSpeed] 47

Reply:

Similar Artilces:

Does Delphi XE5 on Android work with the Android emulator? [Edit]
I find that even a hello-world app exactly like the one that David I outlines (add a button, one line of code, set button text) will not run on the Android Emulator configured out of the box. First, after installing the Rad Studio XE5 trial, I followed David I's steps exactly, and the emulator would not even start. Then I clicked Android SDK manager, updated it, and clicked run-without-debugging. It asked me if I wanted to start the emulator this time so I did. Now the Firemonkey app will not start up the emulator, and while it does appear to start debugging, the emulator scree...

Code works in Delphi 7 but not in Delphi 2010 [Edit]
hello, i have a procedure that open's a file by passing the file name as the parameter to the executable. something like this {code} C : \ P r o g r a m F i l e s \ Da c k e r \ D r a c k e r . e x e " G : \ D E l p h i 7 \ D e l p h i 7 A p p _ l o g . t " {code} The source code is {code} procedure OpenFileWithExe var hReg: HKEY; Ret: Longint; RegDataType, RegDataSize: DWORD; CmdLine: array [0..560] of Char; Len: Integer; SInfo: TStartupInfo; PInfo: TProcessInformation; begin Ret := windows.RegOpenKeyEx(HKEY_CURRENT_USER, ...

Delphi for PHP or Delphi PRISM
Hi, I have the opportunity to develop a web-based library management system. Nothing fancy, just being able to do the usual CRUD stuff for books and provide a search facility. Borrowing is to be done via an email request to the library admin who then sends out the book(s). Since both Delphi for PHP and Delphi PRISM will enable me to develop the app, which one will allow me to deliver it in less time and also increase (even how small) my marketability as a web developer? Thanks. Phillip Flores Phillip Flores wrote: > Hi, > > I have the opportunity to develop a...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

Does Delphi XE5 firemonkey work on current Samsung tablets? [Edit]
I am being told that Delphi XE5 with firemonkey will not work on the current range of Samsung tablets even if they have Android 4 is that true? If so I will be very disappointed having invested thousands of pounds and a few hundred hours to adopt the technology on the promise I can now deploy to Android mobile devices. When I run even the most simple Hello World app I simply get a black screen on my brand new Samsung tablet. I am told it only works on Android devices with a ARMv7 CPU supporting NEON instruction sets. If this is the case developers need to know that I have been told today ...

Delphi XE5 on android Gyroscope, Accelerometer not work (angle) [Edit]
Device: - Google Nexus 7 - Cubot GT99 http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE5/MobileCodeSnippets/Gyroscope/ - does not rotate http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE5/MobileCodeSnippets/Accelerometer/ - work: Acceleration X, Acceleration Y, Acceleration Z - Angle X, Angle Y, Angle Z, Speed not visible Please FIX or I can not set up permissions? P\S http://www.youtube.com/watch?v=NJ8UQiBZfIc ( It also shows on the listed device ) I Edited by: ceollihuk ceollihuk on Nov 16, 2013 2:42 AM ...

send sms android app delphi xe7 question [Edit]
i have written following code for send sms on delphi xe7 but i have following error { java.lang.securityexception: sending sms message : uid10176 does not have android.permission.send_sms } { unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Helpers.Android, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Net, Androidapi.JNI.JavaTypes, Androidapi.JNI.Telephony, Androidapi.Helpers; type TForm1 = c...

[Android] TImage3D can not display on Android (Delphi XE7)
TImage3D can not display any image on Android,Only display black color in TImage3D. But it can be displayed in the windows platform. Android Phone: Nexus5 Version: Delphi XE7 Test step: Create a new Blank project of Multi-Device Application and add a 3D Form , Add a TImage3D control and set property "Bitmap" with any Image/Picuture (etc: PNG or JPG picture),run on Android phone, then you can found the android form display the Image3D with full black color ,not display any picture. But it can be displayed in the windows platform. There is a bug in XE7 so that no material or im...

PHP to Delphi [Edit]
I have this code in PHP: $categorias[] = array('ordem' => 10, 'id_familia_mae_erp' => 'subsubcategoria1', 'id_familia_magento' => 0, 'designacao_familia_mae' => 'A subsubsubcategoria 1', 'magento_status' => 0, 'designacao_pt' => 'A subsubsubcategoria 1 PT', 'designacao_sp' => 'A subsubsubcategoria 1 SP', 'designacao_en' => 'A subsubsubcategoria 1 EN', 'anchor' => '0', 'active' => 1, 'in_menu' => 1); $nome[] = 'subsubsub...

Delphi.NET loading Delphi.Win32 Driver
Hi, What I'm trying to do is marshal an array of cardinal (or integer) back into managed memory from a win32 dll. I know how to pass managed memory into a win32 dll {code} var aa : array of Integer; Buffer : IntPtr; begin SetLength(aa,2); aa[0] := 1; aa[1] := 80; if not Supports(ExtractFilePath(Application.ExeName)+'Win32_Library\SDK_Driver.Win32.io', TypeOf(IMyFunctions), MyFunctions) then Exit; //loads the driver into memory. MyFunctions contains the method names found in the SDK_Driver. Buffer := Marshal.AllocHGlobal(2 * {Marshal.SystemDefaultC...

Migrate from Delphi 2007 for Win32 to Delphi XE
we use Delphi 2007 for Win32 to support legacy (32Bit) OWL-based pascal applications (yes i know it was a mistake not to switch to VCL 15 years ago). could our applications still be opened and compiled with Delphi XE? The existing projects are all plain Pascal-Code, coming back from the times of Turbo Pascal for Windows and later on Borland Pascal. Are there any improvements we could profit from (i.e IDE, Debugger)? Thanks Andrej > {quote:title=Andrej Dimic wrote:}{quote} > could our applications still be opened and compiled with Delphi XE? I'm not sure, but I guess ...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

New to Delphi
Hi I am new to Delphi & want to know good resources for learning to use it. Is there a list of good Delphi learning resources (books/online tutorials) somewhere? What recommendations can anyone make for someone new to Delphi (& only a hobby programmer at the moment)? A couple of weeks ago I started with DelphiXE4 trial & have Googled for a few Delphi resources but I haven't found anything very good yet for me as a beginner. I'm just struggling along trying to learn as I go! (I'm presently struggling with DragandDrop...see [http://stackoverflow.com/questions/17232...

Convert Delphi 7 to Delphi 2009 [Edit]
Hi! Please, I have a code done in Delphi 7... Now I want to convert Delphi 7 to Delphi 2009 but I'm having problems when compile the code. Error message: +[DCC Fatal Error] Far.dpr(9): F2063 Could not compile used unit 'System.pas'+ Please can somebody help me? Source Download (349KB): http://rapidshare.com/files/256191328/FileManager.rar.html Mirror Source Download: http://www.megaupload.com/?d=12GYLPT0 Password: delphi Thank u so much! (sorry for my bad english, it is not my native language) Edited by: loquax loquax on Jul 15, 2009 12:24 PM Sorry, bu...

Why does this work fine in Delphi 2009, but not in Delphi 2010
I've been racking my head trying to figure this out and can't understand what is wrong, TFileStream.ReadComponentRes fails when I try to read a component containing a record, it works fine in Delphi 2009 and Delphi 2007, but fails with Delphi 2010 Here is the unit source and DFM *+//UnitSource+* unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TThresholdMode = (tm0,tm1,tm2,tm3,tm4,tm5); TThreshold = Record Mode:TThresholdMode; Filter,Start,Stop:Integer; end; ...

Web resources about - PHP -> JSON ->Zlib -> Delphi XE7 [win32 -> work | android -> No mapping ] [Edit] - embarcadero.delphi.firemonkey

Resources last updated: 1/13/2016 10:22:59 AM