Skip site navigation (1) Skip section navigation (2)

RE: idea for reading encodign format

From: frank_lupo <frank_lupo(at)email(dot)it>
To: dpage <dpage(at)vale-housing(dot)co(dot)uk>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: RE: idea for reading encodign format
Date: 2002-09-10 13:44:58
Message-ID: H2866Y$7156806CA18AA18321DF427F6561FAD2@email.it (view raw or flat)
Thread:
Lists: pgadmin-hackers
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_encoding_to_char(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_ch
 ar(20)=0
D

union select pg_encoding_to_char(21)
My result is :
 pg_encoding_to_char
---------------------
 ALT
 EUC_CN
 EUC_JP
 EUC_KR
 EUC_TW
 ISO_8859_5
 ISO_8859_6
 KOI8
 LATIN1
 LATIN10
 LATIN2
 LATIN3
 LATIN4
 LATIN5
 LATIN6
 LATIN7
 LATIN8
 LATIN9
 MULE_INTERNAL
 SQL_ASCII
 UNICODE
 WIN
(22 rows)
The order is not by number encoding.

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:frank_lupo(at)email(dot)it] 
Sent: 09 September 2002    16:46
To: pgadmin-hackers
Subject: [pgadmin-hackers] idea    for reading encod
 ign form
a
t


  
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",    "encodin
 g"


   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 Recordset
Dim    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 

Bye !!
Frank Lupo (Wolf) !!


--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f

Sponsor:
Sei un webmaster, vuoi guadagnare? Affiliati ad Artefiori. Clicca qui!
Clicca qui: http://adv2.email.it/cgi-bin/foclick.cgi?mid=751&d=10-9

pgadmin-hackers by date

Next:From: Dave PageDate: 2002-09-10 14:41:10
Subject: Re: idea for reading encodign format
Previous:From: Dave PageDate: 2002-09-10 13:07:13
Subject: Re: idea for reading encodign format

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group