RE: [pgadmin-hackers] idea for reading encodign format

2002-09-11 Thread frank_lupo

Is possible that the problem the vesrione of the compiler? 
My version 7.2iscompiledbyGCC2.95.3-5
Your version 7.2iscompiledbyGCCegcs-2.91.66

Is a problem ?


OK, anyideasontheproblemImentioned?
-OriginalMessage-From:frank_lupo [mailto:[EMAIL PROTECTED]]Sent:10September&
 nbsp;200
2
 16:34To:DavePageCc:pgadmin-hackersSubject: Re:[pgadmin-hackers]ideaforreadingencodignformat

IusingPostgreSQL7.2
template1=#select version(); versionPostgreSQL 7.2oni686-pc-cygwin,compiledbyGCC2.95.3-5(1row)
 
Itriedon2
 ;systems
:


template1=#select versin(); version---!-- -PostgreSQL 7.3b1oni686-pc-cygwin,compiledbyGCC2.95.3-5(1row)

template1=#select &
 nbsp;
s
p;pg_encoding_to_char(0)template1-#unionselect pg_encoding_to_char(1)template1-#unionselect pg_encoding_to_char(2)template1-#unionselect pg_encoding_to_char(3)template1-#unionselect pg_encoding_to_char(4)template1-#unionselect pg_encoding_to_char(5)template1-#unionselect pg_encoding_to_char(6)template1-#unionselect pg_encoding_to_char(7)template1-#unionselect pg_encoding_to_char(8)template1-#unionselect pg_encoding_to_char(9)template1-#unionselect pg_enc
 oding_t!
&
nbsp;o_char(10)template1-#unionselect pg_encoding_to_char(11)template1-#unionselect pg_encoding_to_char(12)template1-#unionselect pg_encoding_to_char(13)template1-#unionselect pg_encoding_to_char(14)template1-#unionselect pg_encoding_to_char(15)template1-#unionselect pg_encoding_to_char(16)template1-#unionselect pg_encoding_to_char(17)template1-#unionselect pg_encoding_to_char(18)template1-#unionselect pg_encoding_to_char(19)template1-#unionselect pg_enc
 oding_to
_
char(20)template1-#unionselect pg_encoding_to_char(21);pg_encoding_to_char-EUC_CNEUC_JPEUC_KREUC_TWJOHABKOI8LATIN1LATIN10LATIN2LATIN3LATIN4LA! TIN5n bsp;LATIN6LATIN7LATIN8LATIN9MULE_INTERNALSQL_ASCIITCVNUNICODEWIN1256WIN874(22 rows)

and

template1=select version(); version---PostgreSQL 7.2oni686-pc-linux-gnu,compiledbyGCCegcs-2.91.66(1! row)

template1= selectpg_encoding_to_char(0)template1
 -
s
p;unionselect pg_encoding_to_char(1)template1-unionselect pg_encoding_to_char(2)template1-unionselect pg_encoding_to_char(3)template1-unionselect pg_encoding_to_char(4)template1-unionselect pg_encoding_to_char(5)template1-unionselect pg_encoding_to_char(6)template1-unionselect pg_encoding_to_char(7)template1-unionselect pg_encoding_to_char(8)template1-unionselect pg_encoding_to_char(9)template1-unionselect pg_encoding_to_char(10)templat
 e1-&
n
bsp;unionselect pg_encoding_to_char(11)template1-unionselectnb!sp; pg_encoding_to_char(12)template1-unionselect pg_encoding_to_char(13)template1-unionselect pg_encoding_to_char(14)template1-unionselect pg_encoding_to_char(15)template1-unionselect pg_encoding_to_char(16)template1-unionselect pg_encoding_to_char(17)template1-unionselect pg_encoding_to_char(18)template1-unionselect pg_encoding_to_char(19)template1-unionselect 
 pg_encod
i
ng_to_char(20)template1-unionselect pg_encoding_to_char(21);pg_encoding_to_char-SQL_ASCII(1 row)

The7.2systemwas!;compiled withoutmultibytesupport.In7.3,multibyteisalwayson.Iguess itprobablydoesn'tmattermuchasit'sobviouslygivingonlyusefulencodings, theproblemisthis(onthe7.2
 bsp;syst
e
m):

template1=select pg_encoding_to_char(45);pg_encoding_to_char-SQL_ASCII(1 row)

template1=select pg_encoding_to_char(450);pg_encoding_to_char-SQL_ASCII(1 row)0D 

Howwouldtheloop knowwhentogiveupandexit?

Regards, Dave. 
 -OriginalMessage-From:frank_lupo [mailto:[EMAIL PROTECTED]]Sent:10September2002 14:45To:DavePage!Cc: pgadmin-hackersSubject: RE:[pgadmin-hackers]ideaforreadingencodignformat
 
 
Ireplacethiscodeinfrmdatabasepgadmin2.Idon'thavethisproblem.  
 p;
0D
Whatisyourresultifyouexecutethisselection? 
selectpg_encoding_to_char(0) 
unionselectpg_encoding_to_char(1) 
unionselectpg_encoding_to_char(2) 
unionselectnbsp;pg_encoding_to_char(3) 
union
 selectpg_encoding_to_char(4) 
unionselectpg_encoding_to_char(5) 
unionselectpg_encoding_to_char(6) 
unionselectpg_encoding_to_char(7) 
unionselectpg_encoding_to_char(8) 
union
b
sp;selectpg_encoding_to_char(9) 
unionselectpg_encoding_to_char(10) 
unionselectpg_encoding_to_char(11) 
unionselectpg_encoding_to_char(12) 
unionselectpg_encoding_to_char(13) 
 p;

<
P>unionselectpg_encoding_to_char(14) 
unionselectpg_encoding_to_char(15) 
unionselect pg_encod!ing_to_char(16) 
unionselectpg_encoding_to_char(17) 
unionselectpg_encoding
 _to_char
(
18) 
unionselectpg_encoding_to_char(19) 
unionselectpg_encoding_to_char(20) 
unionselectpg_encoding_to_char(21) 
Myresultis: 
pg_encoding_to_char-ALTEUC_CNEUC_JPEUC_KREUC_TWISO_8859_5ISO_8859_6KOI8LATIN1
L
ATIN10LATIN2n! 

Re: [pgadmin-hackers] idea for reading encodign format

2002-09-11 Thread Dave Page
Title: Message



Possibly, but as that's the standard compiler shipped with at least one 
reasonably popular Linux distro, we have to assume that others will probably be 
using it and would suffer the same problem - and as it's an infinite loop It's 
definately not going in until a real solution is found.

Regards, Dave

  
  -Original Message-From: frank_lupo 
  [mailto:[EMAIL PROTECTED]] Sent: 11 September 2002 
  07:12To: Dave PageCc: pgadmin-hackersSubject: 
  RE: [pgadmin-hackers] idea for reading encodign format
  Is possible that the problem the vesrione of the compiler? 
  
  My version 
  7.2iscompiledbyGCC2.95.3-5
  Your version 
  7.2iscompiledbyGCCegcs-2.91.66
  
  Is a problem ?
  

OK, 
anyideasontheproblemImentioned?
 

  
  -OriginalMessage-From:frank_lupo 
  [mailto:[EMAIL PROTECTED]]Sent:10September! 
  200 2  
  16:34To:DavePageCc:pgadmin-hackersSubject: 
  Re:[pgadmin-hackers]ideaforreadingencodignformat
   
  IusingPostgreSQL7.2 
  template1=#select 
  version(); 
  versionPostgreSQL 
  7.2oni686-pc-cygwin,compiledbyGCC2.95.3-5(1row) 

  
   
Itriedon2nbs! p;systems : 
 
 
template1=#select 
versin(); 
version---!-- 
-PostgreSQL 
7.3b1oni686-pc-cygwin,compiledbyGCC2.95.3-5(1row) 

 
template1=#select ! nb s 
p;pg_encoding_to_char(0)template1-#unionselect 
pg_encoding_to_char(1)template1-#unionselect 
pg_encoding_to_char(2)template1-#unionselect 
pg_encoding_to_char(3)template1-#unionselect 
pg_encoding_to_char(4)template1-#unionselect 
pg_encoding_to_char(5)template1-#unionselect 
pg_encoding_to_char(6)template1-#unionselect 
pg_encoding_to_char(7)template1-#unionselect 
pg_encoding_to_char(8)template1-#unionselect 
pg_encoding_to_char(9)template1-#unionselect 
pg_en! coding_t!  
nbsp;o_char(10)template1-#unionselect 
pg_encoding_to_char(11)template1-#unionselect 
pg_encoding_to_char(12)template1-#unionselect 
pg_encoding_to_char(13)template1-#unionselect 
pg_encoding_to_char(14)template1-#unionselect 
pg_encoding_to_char(15)template1-#unionselect 
pg_encoding_to_char(16)template1-#unionselect 
pg_encoding_to_char(17)template1-#unionselect 
pg_encoding_to_char(18)template1-#unionselect 
pg_encoding_to_char(19)template1-#unionselect 
pg_en! coding_to _ 
char(20)template1-#unionselect 
pg_encoding_to_char(21);pg_encoding_to_char-EUC_CNEUC_JPEUC_KREUC_TWJOHABKOI8LATIN1LATIN10LATIN2LATIN3LATIN4LA! 
TIN5n 
bsp;LATIN6LATIN7LATIN8LATIN9MULE_INTERNALSQL_ASCIITCVNUNICODEWIN1256WIN874(22 
rows) 

 
and 
 
template1=select 
version(); 
version---PostgreSQL 
7.2oni686-pc-linux-gnu,compiledbyGCCegcs-2.91.66(1! 
row) 

 
template1= 
selectpg_encoding_to_char(0)template! 
1-nb s p;unionselect 
pg_encoding_to_char(1)template1-unionselect 
pg_encoding_to_char(2)template1-unionselect 
pg_encoding_to_char(3)template1-unionselect 
pg_encoding_to_char(4)template1-unionselect 
pg_encoding_to_char(5)template1-unionselect 
pg_encoding_to_char(6)template1-unionselect 
pg_encoding_to_char(7)template1-unionselect 
pg_encoding_to_char(8)template1-unionselect 
pg_encoding_to_char(9)template1-unionselect 
pg_encoding_to_char(10)templa! te1- 
n bsp;unionselect 
pg_encoding_to_char(11)template1-unionselectnb!sp; 
pg_encoding_to_char(12)template1-unionselect 
pg_encoding_to_char(13)template1-unionselect 
pg_encoding_to_char(14)template1-unionselect 
pg_encoding_to_char(15)template1-unionselect 
pg_encoding_to_char(16)template1-unionselect 
pg_encoding_to_char(17)template1-unionselect 
pg_encoding_to_char(18)template1-unionselect 
pg_encoding_to_char(19)template1-unionselect 
! ;pg_encod i 
ng_to_char(20)template1-unionselect 
pg_encoding_to_char(21);pg_encoding_to_char-SQL_ASCII(1 
row) 

 
The7.2systemwas!;compiled 
withoutmultibytesupport.In7.3,multibyteisalwayson.Iguess 
itprobablydoesn'tmattermuchasit'sobviouslygivingonlyusefulencodings, 
theproblemisthis(onthe7.2! 
nbsp;syst e m): 
 
template1=select 
pg_encoding_to_char(45);pg_encoding_to_char-SQL_ASCII(1 
row) 

 
template1=select 
pg_encoding_to_char(450

Re: [pgadmin-hackers] idea for reading encodign format

2002-09-10 Thread Dave Page
Title: Message



Hi 
Frank,

Hmm, that doesn't seem to work here. For any random integervalue of X 
that I try in select pg_encoding_to_char(X), I get SQL_ASCII as the 
result.

This 
is a problem I would like to fix, though I don't have time myself right now 
:-(

Regards, Dave.

  
  -Original Message-From: frank_lupo 
  [mailto:[EMAIL PROTECTED]] Sent: 09 September 2002 
  16:46To: pgadmin-hackersSubject: [pgadmin-hackers] idea 
  for reading encodign format
  for reading encodign format current 
  version is:
   'Load the 
  Encoding Schemes cboProperties(0).Text = 
  "SQL_ASCII" Set objItem = 
  cboProperties(0).ComboItems.Add(, , "SQL_ASCII", "encoding", 
  "encoding") objItem.Selected = True 
   cboProperties(0).ComboItems.Add , , "EUC_JP", 
  "encoding", "encoding" cboProperties(0).ComboItems.Add , 
  , "EUC_CN", "encoding", "encoding" 
  cboProperties(0).ComboItems.Add , , "EUC_KR", "encoding", 
  "encoding" cboProperties(0).ComboItems.Add , , "EUC_TW", 
  "encoding", "encoding" cboProperties(0).ComboItems.Add , 
  , "UNICODE", "encoding", "encoding" 
  cboProperties(0).ComboItems.Add , , "MULE_INTERNAL", "encoding", 
  "encoding" BR ;  cboProperties(0).ComboItems.Add , , 
  "LATIN1", "encoding", "encoding" 
  cboProperties(0).ComboItems.Add , , "LATIN2", "encoding", 
  "encoding" cboProperties(0).ComboItems.Add , , "LATIN3", 
  "encoding", "encoding" cboProperties(0).ComboItems.Add , 
  , "LATIN4", "encoding", "encoding" 
  cboProperties(0).ComboItems.Add , , "LATIN5", "encoding", 
  "encoding" cboProperties(0).ComboItems.Add , , "KOI8", 
  "encoding", "encoding" cboProperties(0).ComboItems.Add , 
  , "WIN", "encoding", "encoding" 
  cboProperties(0).ComboItems.Add , , "ALT", "encoding", "encoding"
  this version is a problem to custom 
  encodign into program. For new encodign modify program to add new 
  encodign
  For reading automatly encodign 
  usign this code :  /P 
  Dim rsSQL As New RecordsetDim 
  bIsValid As Boolean
   'Load the 
  Encoding Schemes bIsValid = True X 
  = 0 While 
  bIsValid Set rsSQL = 
  frmMain.svr.Databases("template1").Execute("select pg_encoding_to_char("  
  X  ")") If 
  rsSQL.Fields(0).Value = "" Then bIsValid = 
  False If bIsValid 
  Then If 
  X = 0 
  Then 
  cboProperties(0).Text = 
  rsSQL.Fields(0).Value 
  Set objItem = cboProperties (0).Comb o Items.Add(, , rsSQL.Fields(0).Value, 
  "encoding", 
  "encoding") 
  objItem.Selected = 
  True 
  Else 
  cboProperties(0).ComboItems.Add , , rsSQL.Fields(0).Value, "encoding", 
  "encoding" 
  End If End 
  If X = X + 
  1 Wend
  
  bye !!
  
  Frank Lupo
  Bye !! Frank Lupo (Wolf) !! 
  Prendi GRATIS l'email 
  universale che... risparmia: clicca qui 
  Sponsor:Tuffati in un mondo di occasioni d'oro...Clicca qui 


RE: [pgadmin-hackers] idea for reading encodign format

2002-09-10 Thread frank_lupo

I replace this code in frmdatabase pgadmin2. I don't have this problem. 
What is your result if you execute this selection ?
select pg_encoding_to_char(0) 
union select pg_encoding_to_char(1)
union select pg_encoding_to_char(2)
union select pg_encoding_to_char(3)
union select pg_encoding_to_char(4)
union select pg_encoding_to_char(5)
union select pg_encoding_to_char(6)
union select pg_encoding_to_char(7)
union select pg_encoding_to_char(8)
union select pg_encoding_to_char(9)
union select pg_encoding_to_char(10)
union select pg_encoding_to_char(11)
union select pg_encoding_to_char(12)
union select pg_encoding_to_char(13)
union select pg_encoding_to_char(14)
union select pg_encoding_to_char(15)
union select pg_encodi
 ng_to_ch
a
r(16)
union select pg_encoding_to_char(17)
union select pg_encoding_to_char(18)
union select pg_encoding_to_char(19)
union select pg_encoding_to_char(20)
union select pg_encoding_to_char(21)
My result is :
pg_encoding_to_char-ALTEUC_CNEUC_JPEUC_KREUC_TWISO_8859_5ISO_8859_6KOI8LATIN1LATIN10LATIN2LATIN3LATIN4LATIN5LATIN6LATIN7LATIN8LATIN9MULE_INTERNAL
 bsp;SQL_
A
SCIIUNICODEWIN(22 rows)
The order is not by number encoding.


Hi Frank,

Hmm,thatdoesn'tseemtoworkhere.ForanyrandomintegervalueofX thatItryinselectpg_encoding_to_char(X),IgetSQL_ASCIIasthe result.

This isaproblemIwouldliketofix,thoughIdon'thavetimemyselfrightnow :-(

Regards,Dave.
-OriginalMessage-From:frank_lupo [mailto:[EMAIL PROTECTED]]Sent:09September2002 16:46To:pgadmin-hackersSubject:[pgadmin-hackers]idea
  &
n
bsp;forreadingencodignformat

forreadingencodignformatcurrent versionis:
'Loadthe EncodingSchemescboProperties(0).Text= "SQL_ASCII"SetobjItem= cboProperties(0).ComboItems.Add(,,"SQL_ASCII","encoding", "encoding")objItem.Selected=True cboProperties(0).ComboItems.Add,,"EUC_JP", "encoding","encoding"cboProperties(0).ComboItems.Add, ,"EUC_CN","en
 coding",
&
nbsp;"encoding" cboProperties(0).ComboItems.Add,,"EUC_KR","encoding", "encoding"cboProperties(0).ComboItems.Add,,"EUC_TW", "encoding","encoding"cboProperties(0).ComboItems.Add, ,"UNICODE","encoding","encoding" cboProperties(0).ComboItems.Add,,"MULE_INTERNAL","encoding", "encoding"BR;cboProperties(0).ComboItems.Add,, "LATIN1","encoding","encoding" cboProperties(0).ComboItems.Add,,"LATIN2","encoding", "encoding"cboProperties(0).ComboItems.Add,,"LATIN3", 
 p;
"
encoding","encoding"cboProperties(0).ComboItems.Add, ,"LATIN4","encoding","encoding" cboProperties(0).ComboItems.Add,,"LATIN5","encoding", "encoding"cboProperties(0).ComboItems.Add,,"KOI8", "encoding","encoding"cboProperties(0).ComboItems.Add, ,"WIN","encoding","encoding" cboProperties(0).ComboItems.Add,,"ALT","encoding","encoding"
thisversionisaproblemtocustom encodignintoprogram.Fornewencodignmodifyprogramtoaddnew 
 sp;encod
i
gn
Forreadingautomatlyencodign usignthiscode:/P 
DimrsSQLAsNewRecordsetDim bIsValidAsBoolean
'Loadthe EncodingSchemesbIsValid=TrueX =0While bIsValidSetrsSQL= frmMain.svr.Databases("template1").Execute("selectpg_encoding_to_char(" X")")If 
 sp;rsSQL
.
Fields(0).Value=""ThenbIsValid= FalseIfbIsValid ThenIf X=0 Then cboProperties(0).Text= rsSQL.Fields(0).Value SetobjItem=cboProperties(0).ComboItems.Add(,,rsSQL.Fields(0).Value, "encoding", "encoding") objItem.Selected= True
 ;&
n
bsp; Else cboProperties(0).ComboItems.Add,,rsSQL.Fields(0).Value,"encoding", "encoding" EndIfEnd IfX=X+ 1Wend

bye!!

FrankLupo
Bye!!FrankLupo
 sp;(Wolf
)
!! 
PrendiGRATISl'email universaleche...risparmia:cliccaqui Sponsor:Tuffatiinunmondodioccasionid'oro...Cliccaqui








Bye !!
Frank Lupo (Wolf) !!


Prendi GRATIS l'email universale che... risparmia: clicca qui 

Sponsor:
Sei un webmaster, vuoi guadagnare? Affiliati ad Artefiori. Clicca qui!
Clicca qui 

Re: [pgadmin-hackers] idea for reading encodign format

2002-09-10 Thread Dave Page
Title: Message



I tried on 2 
systems:

template1=# select 
versin(); 
version--PostgreSQL 
7.3b1 on i686-pc-cygwin, compiled by GCC 2.95.3-5(1 row)

template1=# select 
pg_encoding_to_char(0)template1-# union select 
pg_encoding_to_char(1)template1-# union select 
pg_encoding_to_char(2)template1-# union select 
pg_encoding_to_char(3)template1-# union select 
pg_encoding_to_char(4)template1-# union select 
pg_encoding_to_char(5)template1-# union select 
pg_encoding_to_char(6)template1-# union select 
pg_encoding_to_char(7)template1-# union select 
pg_encoding_to_char(8)template1-# union select 
pg_encoding_to_char(9)template1-# union select 
pg_encoding_to_char(10)template1-# union select 
pg_encoding_to_char(11)template1-# union select 
pg_encoding_to_char(12)template1-# union select 
pg_encoding_to_char(13)template1-# union select 
pg_encoding_to_char(14)template1-# union select 
pg_encoding_to_char(15)template1-# union select 
pg_encoding_to_char(16)template1-# union select 
pg_encoding_to_char(17)template1-# union select 
pg_encoding_to_char(18)template1-# union select 
pg_encoding_to_char(19)template1-# union select 
pg_encoding_to_char(20)template1-# union select 
pg_encoding_to_char(21);pg_encoding_to_char-EUC_CNEUC_JPEUC_KREUC_TWJOHABKOI8LATIN1LATIN10LATIN2LATIN3LATIN4LATIN5LATIN6LATIN7LATIN8LATIN9MULE_INTERNALSQL_ASCIITCVNUNICODEWIN1256WIN874(22 
rows)

and

template1= 
select 
version(); 
version---PostgreSQL 
7.2 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66(1 
row)

template1= 
select pg_encoding_to_char(0)template1- union select 
pg_encoding_to_char(1)template1- union select 
pg_encoding_to_char(2)template1- union select 
pg_encoding_to_char(3)template1- union select 
pg_encoding_to_char(4)template1- union select 
pg_encoding_to_char(5)template1- union select 
pg_encoding_to_char(6)template1- union select 
pg_encoding_to_char(7)template1- union select 
pg_encoding_to_char(8)template1- union select 
pg_encoding_to_char(9)template1- union select 
pg_encoding_to_char(10)template1- union select 
pg_encoding_to_char(11)template1- union select 
pg_encoding_to_char(12)template1- union select 
pg_encoding_to_char(13)template1- union select 
pg_encoding_to_char(14)template1- union select 
pg_encoding_to_char(15)template1- union select 
pg_encoding_to_char(16)template1- union select 
pg_encoding_to_char(17)template1- union select 
pg_encoding_to_char(18)template1- union select 
pg_encoding_to_char(19)template1- union select 
pg_encoding_to_char(20)template1- union select 
pg_encoding_to_char(21);pg_encoding_to_char-SQL_ASCII(1 
row)

The 7.2 system was 
compiled withoutmultibyte support. In 7.3, multibyte is always on. I guess 
it probably doesn't matter much as it's obviously giving only useful encodings, 
the problem is this (on the 7.2 system):

template1= 
select 
pg_encoding_to_char(45);pg_encoding_to_char-SQL_ASCII(1 
row)

template1= 
select 
pg_encoding_to_char(450);pg_encoding_to_char-SQL_ASCII(1 
row)

How would the loop 
know when to give up and exit?

Regards, 
Dave.

  
  -Original Message-From: frank_lupo 
  [mailto:[EMAIL PROTECTED]] Sent: 10 September 2002 
  14:45To: Dave PageCc: pgadmin-hackersSubject: 
  RE: [pgadmin-hackers] idea for reading encodign format
  
  I replace this code in frmdatabase pgadmin2. I don't have this problem. 

  What is your result if you execute this selection ?
  select pg_encoding_to_char(0) 
  union select pg_encoding_to_char(1)
  union select 
  pg_encoding_to_char(2)
  union select 
  pg_encoding_to_char(3)
  union select 
  pg_encoding_to_char(4)
  union select 
  pg_encoding_to_char(5)
  union select 
  pg_encoding_to_char(6)
  union select<FO! 1 size="D" NT> 
  pg_encoding_to_char(7)
  union select 
  pg_encoding_to_char(8)
  union select 
  pg_encoding_to_char(9)
  union select 
  pg_encoding_to_char(10)
  union select 
  pg_encoding_to_char(11)
  union select 
  pg_encoding_to_char(12)
  union select 
  pg_encoding_to_char(13)
  union select 
  pg_encoding_to_char(14)
  union select 
  pg_encoding_to_char(15)
  union select 
  pg_encod! ing_to_ch a r(16)
  union select 
  pg_encoding_to_char(17)
  union select 
  pg_encoding_to_char(18)
  union select 
  pg_encoding_to_char(19)
  union select 
  pg_encoding_to_char(20)
  union select pg_encoding_to_char(21)
  My result is :
  pg_encoding_to_char-ALTEUC_CNEUC_JPEUC_KREUC_TWISO_8859_5ISO_8859_6KOI8LATIN1LATIN10LATIN2LATIN3LATIN4LATIN5LATIN6LATIN7LATIN8LATIN9MULE_INTERNAL! 
  nbsp;SQL_ A SCIIUNICODEWIN(22 rows)
  The order is not by number encoding.
  
  
Hi Frank,

Hmm,thatdoesn'tseemtoworkhere.ForanyrandomintegervalueofX 
thatItryinselectpg_encoding_to_char(X),IgetSQL_ASCIIasthe 
result.

This 
isaproble

Re: [pgadmin-hackers] idea for reading encodign format

2002-09-10 Thread frank_lupo
I usingPostgreSQL 7.2
template1=# select version(); versionPostgreSQL 7.2 on i686-pc-cygwin, compiled by GCC 2.95.3-5(1 row)


Itriedon2 systems:

template1=#select versin(); version
 
-
-PostgreSQL 7.3b1oni686-pc-cygwin,compiledbyGCC2.95.3-5(1row)

template1=#select pg_encoding_to_char(0)template1-#unionselect pg_encoding_to_char(1)template1-#unionselect pg_encoding_to_char(2)template1-#unionselect pg_encoding_to_char(3)template1-#unionselect pg_encoding_to_char(4)template1-#unionselect pg_encoding_to_char(5)template1-#unionselect pg_encoding_to_char(6)template1-#unionselect pg_encoding_to_char(7)template1-#unionselect pg_encoding_to_char(8)template1-#unionselect pg_encoding_to_char(9)template1-#unionselect pg_encoding_to
 _char(10
)
template1-#unionselect pg_encoding_to_char(11)template1-#unionselect pg_encoding_to_char(12)template1-#unionselect pg_encoding_to_char(13)template1-#unionselect pg_encoding_to_char(14)template1-#unionselect pg_encoding_to_char(15)template1-#unionselect pg_encoding_to_char(16)template1-#unionselect pg_encoding_to_char(17)template1-#unionselect pg_encoding_to_char(18)template1-#unionselect pg_encoding_to_char(19)template1-#unionselect pg_encoding_to_char(20)template1-#unionselect pg_encoding_to_char(21);pg_encoding_to_char-EUC_CNEUC_JPEUC_KREUC_TWJOHABKOI8LATIN1LATIN10LATIN2LATIN3LATIN4LAT
 IN5&
n
bsp;LATIN6LATIN7LATIN8LATIN9MULE_INTERNALSQL_ASCIITCVNUNICODEWIN1256WIN874(22 rows)

and

template1= select version(); version---PostgreSQL 7.2oni686-pc-linux-gnu,compiledbyGCCegcs-2.91.66(1&
 nbsp; ro
w
)

template1= selectpg_encoding_to_char(0)template1-unionselect pg_encoding_to_char(1)template1-unionselect pg_encoding_to_char(2)template1-unionselect pg_encoding_to_char(3)template1-unionselect pg_encoding_to_char(4)template1-unionselect pg_encoding_to_char(5)template1-unionselect pg_encoding_to_char(6)template1-unionselect pg_encoding_to_char(7)template1-unionselect pg_encoding_to_char(8)template1-unionselect pg_encoding_to_char(9)template1-unionselect pg_encoding_to_char(10)template1-unionselect pg_encoding_to_char(11)template1-unionselect
 p; pg_en
c
oding_to_char(12)template1-unionselect pg_encoding_to_char(13)template1-unionselect pg_encoding_to_char(14)template1-unionselect pg_encoding_to_char(15)template1-unionselect pg_encoding_to_char(16)template1-unionselect pg_encoding_to_char(17)template1-unionselect pg_encoding_to_char(18)template1-unionselect pg_encoding_to_char(19)template1-unionselect pg_encoding_to_char(20)template1-unionselect pg_encoding_to_char(21);pg_encoding_to_char-SQL_ASCII(1 row)

The7.2systemwas
  compile
d
withoutmultibytesupport.In7.3,multibyteisalwayson.Iguess itprobablydoesn'tmattermuchasit'sobviouslygivingonlyusefulencodings, theproblemisthis(onthe7.2system):

template1= select pg_encoding_to_char(45);pg_encoding_to_char-SQL_ASCII(1 row)

template1= select pg_encoding_to_char(450);pg_encoding_to_char-SQL_ASCII(1 row)0
D

Howwouldtheloop knowwhentogiveupandexit?

Regards, Dave.
-OriginalMessage-From:frank_lupo [mailto:[EMAIL PROTECTED]]Sent:10September2002 14:45To:DavePage<
 B>Cc:
pgadmin-hackersSubject: RE:[pgadmin-hackers]ideaforreadingencodignformat


Ireplacethiscodeinfrmdatabasepgadmin2.Idon'thavethisproblem. 
Whatisyourresultifyouexecutethisselection?
selectpg_encoding_to_char(0)
unionselectpg_encoding_to_char(1)
unionselect pg_encoding_to_char(2)
unionselect
&
nbsp; pg_encoding_to_char(3)
unionselect pg_encoding_to_char(4)
unionselect pg_encoding_to_char(5)
unionselect pg_encoding_to_char(6)
unionselect pg_encoding_to_char(7)
unionselect pg_encoding_to_char(8)
unionselect pg_encoding_to_char(9)
unionselect pg_encoding_to_char(10)
unionselect pg_encoding_to_char(11)
unionselect pg_encoding_to_char(12)
unionselect pg_encoding_to_char(13)
unionselect pg_encoding_to_char(14)
unionselect pg_encoding_to_char(15)
unionselect pg_encod!ing_to_char(16)
unionselect pg_encoding_to_char(17)
unionselect pg_encoding_to_char(18)
unionselect pg_encoding_to_char(19)
unionselect pg_encoding_to_char(20)
unionselectpg_encoding_to_char(21)
Myresultis:
pg_encoding_to_char-ALTEUC_CNEUC_JPEUC_KREUC_TWISO_8859_5ISO_8859_6KOI8LATIN1LATIN10LATIN2
 sp;LATIN
3
LATIN4LATIN5LATIN6LATIN7LATIN8LATIN9MULE_INTERNAL! nbsp;SQL_ASCIIUNICODEWIN(22rows)
Theorderisnotbynumberencoding.
 
HiFrank,

Hmm,thatdoesn'tseemtoworkhere.ForanyrandomintegervalueofX 
 p;
&
nbsp;thatItryinselectpg_encoding_to_char(X),IgetSQL_ASCIIasthe result.

This isaproblemIwouldliketofix,thoughIdon'thavetimemyselfrightnow :-(

Regards,Dave.
 <
/
DIV> 
 -OriginalMessage-From:frank_lupo [mailto:[EMAIL PROTECTED]]Sent:09September2002 

Re: [pgadmin-hackers] idea for reading encodign format

2002-09-10 Thread Dave Page
Title: Message



OK, 
any ideas on the problem I mentioned?

  
  -Original Message-From: frank_lupo 
  [mailto:[EMAIL PROTECTED]] Sent: 10 September 2002 
  16:34To: Dave PageCc: pgadmin-hackersSubject: 
  Re: [pgadmin-hackers] idea for reading encodign format
  I usingPostgreSQL 7.2
  template1=# select 
  version(); 
  versionPostgreSQL 
  7.2 on i686-pc-cygwin, compiled by GCC 2.95.3-5(1 row)
  
  
Itriedon2 systems:

template1=#select 
versin(); 
version---! - - 
-PostgreSQL 
7.3b1oni686-pc-cygwin,compiledbyGCC2.95.3-5(1row)

template1=#select 
pg_encoding_to_char(0)template1-#unionselect 
pg_encoding_to_char(1)template1-#unionselect 
pg_encoding_to_char(2)template1-#unionselect 
pg_encoding_to_char(3)template1-#unionselect 
pg_encoding_to_char(4)template1-#unionselect 
pg_encoding_to_char(5)template1-#unionselect 
pg_encoding_to_char(6)template1-#unionselect 
pg_encoding_to_char(7)template1-#unionselect 
pg_encoding_to_char(8)template1-#unionselect 
pg_encoding_to_char(9)template1-#unionselect 
pg_encoding_t! o_char(10 ) template1-#unionselect 
pg_encoding_to_char(11)template1-#unionselect 
pg_encoding_to_char(12)template1-#unionselect 
pg_encoding_to_char(13)template1-#unionselect 
pg_encoding_to_char(14)template1-#unionselect 
pg_encoding_to_char(15)template1-#unionselect 
pg_encoding_to_char(16)template1-#unionselect 
pg_encoding_to_char(17)template1-#unionselect 
pg_encoding_to_char(18)template1-#unionselect 
pg_encoding_to_char(19)template1-#unionselect 
pg_encoding_to_char(20)template1-#unionselect 
pg_encoding_to_char(21);pg_encoding_to_char-EUC_CNEUC_JPEUC_KREUC_TWJOHABKOI8LATIN1LATIN10LATIN2LATIN3LATIN4LA! 
TIN5 n 
bsp;LATIN6LATIN7LATIN8LATIN9MULE_INTERNALSQL_ASCIITCVNUNICODEWIN1256WIN874(22 
rows)

and

template1= select 
version(); 
version---PostgreSQL 
7.2oni686-pc-linux-gnu,compiledbyGCCegcs-2.91.66(1! 
 ro w )

template1= 
selectpg_encoding_to_char(0)template1-unionselect 
pg_encoding_to_char(1)template1-unionselect 
pg_encoding_to_char(2)template1-unionselect 
pg_encoding_to_char(3)template1-unionselect 
pg_encoding_to_char(4)template1-unionselect 
pg_encoding_to_char(5)template1-unionselect 
pg_encoding_to_char(6)template1-unionselect 
pg_encoding_to_char(7)template1-unionselect 
pg_encoding_to_char(8)template1-unionselect 
pg_encoding_to_char(9)template1-unionselect 
pg_encoding_to_char(10)template1-unionselect 
pg_encoding_to_char(11)template1-unionselectnb! sp; 
pg_en c oding_to_char(12)template1-unionselect 
pg_encoding_to_char(13)template1-unionselect 
pg_encoding_to_char(14)template1-unionselect 
pg_encoding_to_char(15)template1-unionselect 
pg_encoding_to_char(16)template1-unionselect 
pg_encoding_to_char(17)template1-unionselect 
pg_encoding_to_char(18)template1-unionselect 
pg_encoding_to_char(19)template1-unionselect 
pg_encoding_to_char(20)template1-unionselect 
pg_encoding_to_char(21);pg_encoding_to_char-SQL_ASCII(1 
row)

The7.2systemwas! ; compile d 
withoutmultibytesupport.In7.3,multibyteisalwayson.Iguess 
itprobablydoesn'tmattermuchasit'sobviouslygivingonlyusefulencodings, 
theproblemisthis(onthe7.2system):

template1= select 
pg_encoding_to_char(45);pg_encoding_to_char-SQL_ASCII(1 
row)

template1= select 
pg_encoding_to_char(450);pg_encoding_to_char-SQL_ASCII(1 
row)0 D 

Howwouldtheloop 
knowwhentogiveupandexit?

Regards, 
Dave.
 

  
  -OriginalMessage-From:frank_lupo 
  [mailto:[EMAIL PROTECTED]]Sent:10September2002 
  14:45To:DavePage! Cc: 
  pgadmin-hackersSubject: 
  RE:[pgadmin-hackers]ideaforreadingencodignformat
   
   
  Ireplacethiscodeinfrmdatabasepgadmin2.Idon'thavethisproblem. 
   
  Whatisyourresultifyouexecutethisselection? 
  selectpg_encoding_to_char(0) 
  unionselectpg_encoding_to_char(1) 
  unionselect pg_encoding_to_char(2) 
  unionselect  nbsp; pg_encoding_to_char(3) 
  unionselect pg_encoding_to_char(4) 
  unionselect pg_encoding_to_char(5) 
  unionselect pg_encoding_to_char(6) 
  unionselect<FO! NT 
  SIZE="D" 1> pg_encoding_to_char(7) 
  unionselect pg_encoding_to_char(8) 
  unionselect pg_encoding_to_char(9) 
  unionselect pg_encoding_to_char(10) 
  unionselect pg_encoding_to_char(11) 
  unionselect pg_encoding_to_char(12) 
  unionselect pg_encoding_to_char(13) 
  unionselect pg_encoding_to_char(14)