I want the Term display to be the default sjis

Asked 2 years ago, Updated 2 years ago, 118 views

The Japanese data in DB (PostgreSQL) is sjis when connected to each server by ssh from TeraTerm, but you have to set set client_encoding to 'sjis' every time to display Japanese.

I'd like to not set this to set client... but automatically set it up so that I can see the Japanese language as soon as I log in.

postgresql teraterm

2022-09-30 19:07

2 Answers

Is it a PostgreSQL question, not a Tera Term question?

PostgreSQL documentation - Chapter 22, Multilingual , "22.3. Automatic Character Set Conversion Between Server Clients" explains this.


2022-09-30 19:07

Changing the TeraTerm setting will probably result in another characterization injury when operating on a server that is not PostgreSQL related.

To supplement Kohei TAMURA's response, suppose that the server is Linux and the shell is bash, you should change the character code when connecting to the PostgreSQL server in one of the following ways:

  • .bashrc, .bash_profile, etc.

    export PGCLIENTENCODING="sjis"
    
  • Add the following settings to postgresql.conf

    #vi/var/lib/pgsql/<PG_VER>/data/postgresql.conf
    
    client_encoding=sjis
    

Add the following settings to .bashrc, .bash_profile, etc.

export PGCLIENTENCODING="sjis"

Add the following settings to postgresql.conf

#vi/var/lib/pgsql/<PG_VER>/data/postgresql.conf

client_encoding=sjis


2022-09-30 19:07

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.