build Import LIB from LibPQ.DLL
Re: build Import LIB from LibPQ.DLL
hi,
have try Sample c:\fwh\samples\pgre01.prg again
using my old PostgreSQL v9.5 Server and WIN1252 for Database
now i can "input", even German Umlaute, and "save" it
on same Server i try UTF8 Table but than it fail again ...
so i need to use ANSI Table for Fivewin Sample
have try Sample c:\fwh\samples\pgre01.prg again
using my old PostgreSQL v9.5 Server and WIN1252 for Database
now i can "input", even German Umlaute, and "save" it
on same Server i try UTF8 Table but than it fail again ...
so i need to use ANSI Table for Fivewin Sample
greeting,
Jimmy
Jimmy
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: build Import LIB from LibPQ.DLL
Thanks for the information.
How do you propose to proceed further now?
How do you propose to proceed further now?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: build Import LIB from LibPQ.DLL
hi,
i have read in PostgreSQL Manual and found
but i can change it to
now it work perfect UTF8 <-> WIN1252 and no hb_translate() is need any more
! Note : SERVER_ENCODING Setting are default for Database ( Catalog ) ... but Table itself can be different
p.s. have use TGrid() but it should work with XBROWSE too
i have read in PostgreSQL Manual and found
it does show me UTF8 or WIN1252, depend on Server, on both Side"SHOW SERVER_ENCODING"
"SHOW CLIENT_ENCODING"
but i can change it to
Code: Select all | Expand
cQuery := 'SET CLIENT_ENCODING TO "WIN1252"'
cENCODING := oPGU:QuickQuery( cQuery )
CONNECT2SRV( 207 ) cPGVersion = "PostgreSQL 14.1, compiled by Visual C++ build 1914, 64-bit"
CONNECT2SRV( 209 ) FWPG_ListSchemas( oPGU ) = {"pg_toast","pg_catalog","public","information_schema"}
CONNECT2SRV( 213 ) cENCODING = "UTF8"
CONNECT2SRV( 217 ) cENCODING = ""
CONNECT2SRV( 221 ) cENCODING = "WIN1252"
Code: Select all | Expand
cQuery := "SELECT version()"
cPGVersion := oPGU:QuickQuery( cQuery )
IF !EMPTY( cPGVersion )
oPGU:cVersion := cPGVersion
ENDIF
fwlog cPGVersion
fwlog FWPG_ListSchemas( oPGU )
cQuery := "SHOW SERVER_ENCODING"
cENCODING := oPGU:QuickQuery( cQuery )
fwlog cENCODING
cQuery := 'SET CLIENT_ENCODING TO "WIN1252"'
cENCODING := oPGU:QuickQuery( cQuery )
fwlog cENCODING
cQuery := "SHOW CLIENT_ENCODING"
cENCODING := oPGU:QuickQuery( cQuery )
fwlog cENCODING
! Note : SERVER_ENCODING Setting are default for Database ( Catalog ) ... but Table itself can be different
p.s. have use TGrid() but it should work with XBROWSE too
greeting,
Jimmy
Jimmy
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: build Import LIB from LibPQ.DLL
Thanks for sharing the information.
What is "WIN1252" ?
Is the German "Umlaute" issue is resolved now? ( by keeping FW_SetUnicode() to .F.)
Please also share the code for creating a table with WIN1252
What is "WIN1252" ?
Is the German "Umlaute" issue is resolved now? ( by keeping FW_SetUnicode() to .F.)
Please also share the code for creating a table with WIN1252
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: build Import LIB from LibPQ.DLL
hi,
https://wiki.freepascal.org/Language_Codes
https://www.vbsedit.com/html/882ca1eb-8 ... 40bf70.asp
https://www.science.co.il/language/Locale-codes.php
do not need to use FW_SetUnicode(.T. / .F.)
you can use "Database" e.g Customer1 to "hold" all TABLE of Customer1
you can use "Database" e.g Customer2 to "hold" all TABLE of Customer2
"Database" default Setting work for TABLE
Manual PostgreSQLnageswaragunupudi wrote:What is "WIN1252" ?
i got WIN1252 Codepage from here22.3.3. Automatic Character Set Conversion Between Server and Client
https://wiki.freepascal.org/Language_Codes
https://www.vbsedit.com/html/882ca1eb-8 ... 40bf70.asp
https://www.science.co.il/language/Locale-codes.php
no Problem with German "Umlaute" any morenageswaragunupudi wrote:Is the German "Umlaute" issue is resolved now? ( by keeping FW_SetUnicode() to .F.)
do not need to use FW_SetUnicode(.T. / .F.)
please Note : "Database" = "Catalog" does "hold" TABLEnageswaragunupudi wrote:Please also share the code for creating a table with WIN1252
you can use "Database" e.g Customer1 to "hold" all TABLE of Customer1
you can use "Database" e.g Customer2 to "hold" all TABLE of Customer2
"Database" default Setting work for TABLE
Code: Select all | Expand
CREATE DATABASE name
[ [ WITH ] [ OWNER [=] user_name ]
[ TEMPLATE [=] template ]
[ ENCODING [=] encoding ]
[ LC_COLLATE [=] lc_collate ]
[ LC_CTYPE [=] lc_ctype ]
[ TABLESPACE [=] tablespace ]
[ CONNECTION LIMIT [=] connlimit ] ]
Code: Select all | Expand
CREATE DATABASE mdidemo
WITH
OWNER = postgres
ENCODING = 'WIN1252'
LC_COLLATE = 'German_Germany.1252'
LC_CTYPE = 'German_Germany.1252'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
Code: Select all | Expand
EATE DATABASE mdidemo
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'German_Germany.1252'
LC_CTYPE = 'German_Germany.1252'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
greeting,
Jimmy
Jimmy
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: build Import LIB from LibPQ.DLL
Thanks for sharing the information.
Next.
You were getting errors while saving data with the pgre01.prg.
Now is that problem resolved?
If so what could be the reason for those errors?
Can you provide feedback on this issue please?
Next.
You were getting errors while saving data with the pgre01.prg.
Now is that problem resolved?
If so what could be the reason for those errors?
Can you provide feedback on this issue please?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: build Import LIB from LibPQ.DLL
hi,
---
my "native" LibPQ.DLL Version, using TGrid() work also with FW_SetUnicode( .T. )
but TGrid() fail to "send" Notify Event and "Input" is wrong when use FW_SetUnicode( .T. )
---
is FW_SetUnicode() for hole App of for each Thread
when set "ENCODING" and FW_SetUnicode( .F. ) it work on both PostgreSQL Server and XBROWSErnageswaragunupudi wrote:You were getting errors while saving data with the pgre01.prg.
Now is that problem resolved?
i can´t say why "edit" use wrong "Position" when NOT set "ENCODING" and FW_SetUnicode( .F. )nageswaragunupudi wrote:If so what could be the reason for those errors?
Can you provide feedback on this issue please?
---
my "native" LibPQ.DLL Version, using TGrid() work also with FW_SetUnicode( .T. )
but TGrid() fail to "send" Notify Event and "Input" is wrong when use FW_SetUnicode( .T. )
---
is FW_SetUnicode() for hole App of for each Thread
greeting,
Jimmy
Jimmy
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: build Import LIB from LibPQ.DLL
Yes, this setting is for the entire application.is FW_SetUnicode() for hole App of for each Thread
This setting decides whether all Windows messages are 16-bit (UTF16) or 8-bit(ANSI)
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India