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" character

That is normal, because Chars is probably an array of jchar, and a jchar is utf-16 (= widechar). That means that if you treat it as pchar and it only contains plain ASCII, the second "ansichar" will always be #0 on a little endian system (on a big endian system, the first "ansichar" will already be #0).


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to