Thread

  1. Encoding problem

    PostgreSQL Bugs List <pgsql-bugs@postgresql.org> — 2001-03-21T09:00:01Z

    Danny Kao (danny.kao@autotools.com.tw) reports a bug with a severity of 2
    The lower the number the more severe it is.
    
    Short Description
    Encoding problem
    
    Long Description
    I have tried "initdb --encoding=BIG5" 
    then doing some create table and insert.
    As shows below,it seems loss one byte "\",
    and dumping data  is the same.
    How could I got the right result?
    
    
    Sample Code
    Welcome to psql, the PostgreSQL interactive terminal.
    
    Type:  \copyright for distribution terms
           \h for help with SQL commands
           \? for help on internal slash commands
           \g or terminate with semicolon to execute query
           \q to quit
    
    template1=# \encoding
    BIG5
    template1=# create table a (a text);
    CREATE
    template1=# insert into a values('\h');
    INSERT 18761 1
    template1=# select * from a;
      a  
    -----
     h
    (1 row)
    
    No file was uploaded with this report
    
    
    
  2. Re: Encoding problem

    Tatsuo Ishii <t-ishii@sra.co.jp> — 2001-03-21T14:14:12Z

    > Danny Kao (danny.kao@autotools.com.tw) reports a bug with a severity of 2
    > The lower the number the more severe it is.
    > 
    > Short Description
    > Encoding problem
    > 
    > Long Description
    > I have tried "initdb --encoding=BIG5" 
    
    You cannot do that (documented in README.mb). If you want to use
    traditional chinese do:
    
    initdb --encoding=EUC_TW
    
    instead.
    --
    Tatsuo Ishii
    
    
  3. Re: Encoding problem

    danny <danny.kao@autotools.com.tw> — 2001-03-21T15:05:27Z

    Dear Sir :
          Thanx. After tried it again, it still couldn't work now.
          The result is the same error.
        *********************************************
     template1=# \encoding
    EUC_TW
    template1=# \z
    Access permissions for database "template1"
     Relation | Access permissions
    ----------+--------------------
    (0 rows)
    
    template1=# create table a( a text);
    CREATE
    template1=# insert into a values('許多');
    INSERT 18761 1
    template1=# select * from a;
      a
    -----
     釵h
    (1 row)
    
    template1=# insert into a values('許\多');
    INSERT 18762 1
    template1=# select * from a;
      a
    ------
     釵h
     許多
    (2 rows)
     *********************************************
    It seems it ate the "\" , so the word it appeared not the origin one.
                                                                          Danny
    
    ----- Original Message -----
    From: "Tatsuo Ishii" <t-ishii@sra.co.jp>
    To: <danny.kao@autotools.com.tw>; <pgsql-bugs@postgresql.org>
    Sent: Wednesday, March 21, 2001 10:14 PM
    Subject: Re: [BUGS] Encoding problem
    
    
    > Danny Kao (danny.kao@autotools.com.tw) reports a bug with a severity of 2
    > The lower the number the more severe it is.
    >
    > Short Description
    > Encoding problem
    >
    > Long Description
    > I have tried "initdb --encoding=BIG5"
    
    You cannot do that (documented in README.mb). If you want to use
    traditional chinese do:
    
    initdb --encoding=EUC_TW
    
    instead.
    --
    Tatsuo Ishii
    
    
    
    
  4. Re: Encoding problem

    Tatsuo Ishii <t-ishii@sra.co.jp> — 2001-03-21T22:32:48Z

    > Dear Sir :
    >       Thanx. After tried it again, it still couldn't work now.
    >       The result is the same error.
    >     *********************************************
    >  template1=# \encoding
    > EUC_TW
    > template1=# insert into a values('\');
    > INSERT 18762 1
    
    What is \261\\? It does not seem to be correct EUC_TW. Probably you
    want to enter BIG5 from psql? The you should do like this:
    
    \encoding BIG5
    insert into a values('some big5 characters');
    
    For the inserting value you should not use octal exporession but
    should enter "raw" big5 characters.
    --
    Tatsuo Ishii