Hi,
Yes i know that, and becauae of that i finally fix this with aliasing in fbapi
unit Pchar = PAnsiChar
I do this only to got some results from api
I finall implementation i do this better and replace PChar in fbapi as some
internal type like PFBChar and this type for delphi i change as PAnsiChar
{$Ifdef FPC}
PFBChar = PChar;
{$else}
PFBChar = PAnsiChar;
{$endif}
Regards,
Karol Bieniaszewski
----- Reply message -----
Od: "Geoff Worboys" <ge...@telesiscomputing.com.au>
Do: "For discussion among Firebird Developers"
<firebird-devel@lists.sourceforge.net>
Temat: [Firebird-devel] Firebird 3 API demo usage with Pascal
Data: sob., mar 7, 2015 00:54
liviusliv...@poczta.onet.pl wrote:
> Hi Adriano,
> thanks i found this
> i change also
> PChar = type System.Pointer;
and you write, in a later post:
> i try to run your example - i change code to Delphi
With recent (2009+) versions of Delphi "string" is a UTF-16
string, so PChar is a pointer to a word, not a byte. Being
such a fundamental type in Delphi you really don't want to
try and change it.
I'm not that familiar with FreePascal, but I understand its
"string" type uses UTF-8 and PChar/Char are aliases for
PAnsiChar and AnsiChar. see:
http://wiki.freepascal.org/FPC_Unicode_support
I've not been following FB3 stuff closely but I'm assuming the
API will be working with UTF-8 strings. So any attempt to
provide both Delphi and FreePascal support in example code will
need to take care to use specific types, like UTF8String rather
than just String. And PAnsiChar and AnsiChar for the string
elements.
--
Geoff Worboys
Telesis Computing Pty Ltd
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel