Re: RE : RE : [fpc-pascal] android JNI JString to String

2011-04-26 Thread herux
Yes, there's bug. thanks you. I using GetStringUTFChars function JNI_JStringToString(Env: PJNIEnv; JStr: jstring): String; var IsCopy: Pjboolean; Chars: PChar; begin if JStr = nil then begin Result := ''; Exit; end; Chars:= Env^.GetStringUTFChars(Env, JStr, IsCopy); if Char

RE : RE : [fpc-pascal] android JNI JString to String

2011-04-26 Thread Ludo Brands
i 26 avril 2011 13:06 À : fpc-pascal@lists.freepascal.org Objet : Re: RE : [fpc-pascal] android JNI JString to String thanks for the response. I am doing what you suggest. but it's still the same. I debug this line of code using android log Chars := Env^.GetStringChars(Env, AJString, nil);

Re: RE : [fpc-pascal] android JNI JString to String

2011-04-26 Thread Jonas Maebe
On 26 Apr 2011, at 13:06, herux wrote: I debug this line of code using android log Chars := Env^.GetStringChars(Env, AJString, nil); __android_log_write(ANDROID_LOG_DEBUG,'proj_debug',PChar(Chars)); and the log I retrieved : 04-26 17:53:17.942: DEBUG/proj_debug(711): e <--- only "e" characte

Re: RE : [fpc-pascal] android JNI JString to String

2011-04-26 Thread herux
thanks for the response. I am doing what you suggest. but it's still the same. I debug this line of code using android log Chars := Env^.GetStringChars(Env, AJString, nil); __android_log_write(ANDROID_LOG_DEBUG,'proj_debug',PChar(Chars)); and the log I retrieved : 04-26 17:53:17.942: DEBUG/pr

RE : [fpc-pascal] android JNI JString to String

2011-04-26 Thread Ludo Brands
avril 2011 10:37 À : fpc-pascal@lists.freepascal.org Objet : [fpc-pascal] android JNI JString to String I have a strange problem, I pass data from the android String via JNI. pass data from FreePascal wideString successfully using the following code NewString: function (Env: PJNIEnv; const Unico

[fpc-pascal] android JNI JString to String

2011-04-26 Thread herux
I have a strange problem, I pass data from the android String via JNI. pass data from FreePascal wideString successfully using the following code NewString: function (Env: PJNIEnv; const Unicode: PJChar; Len: JSize): JString; cdecl; GetStringChars:function(Env:PJNIEnv;Str:JString;IsCopy:PJBoolean