2016年08月09日

PostgreSQL の locale

postgresql.conf
--------------------------------------------------------------------------------------------
Windows7        
1.EXE
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'C'# locale for system error message
# strings
lc_monetary = 'C'# locale for monetary formatting
lc_numeric = 'C'# locale for number formatting
lc_time = 'C'# locale for time formatting
--------------------------------------------------------------------------------------------
CentOS7          
2.YUM  
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'ja_JP.UTF-8'# locale for system error message
# strings
lc_monetary = 'ja_JP.UTF-8'# locale for monetary formatting
lc_numeric = 'ja_JP.UTF-8'# locale for number formatting
lc_time = 'ja_JP.UTF-8'# locale for time formatting
--------------------------------------------------------------------------------------------
3.RUN(locale-C)  
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'C'# locale for system error message
# strings
lc_monetary = 'C'# locale for monetary formatting
lc_numeric = 'C'# locale for number formatting
lc_time = 'C'# locale for time formatting
--------------------------------------------------------------------------------------------
4.RUN(locale-ja_JP.utf8 ) 
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'ja_JP.utf8'# locale for system error message
# strings
lc_monetary = 'ja_JP.utf8'# locale for monetary formatting
lc_numeric = 'ja_JP.utf8'# locale for number formatting
lc_time = 'ja_JP.utf8'# locale for time formatting
--------------------------------------------------------------------------------------------
Ubuntu 16.04 LTS
5.APT  
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'ja_JP.UTF-8'# locale for system error message
# strings
lc_monetary = 'ja_JP.UTF-8'# locale for monetary formatting
lc_numeric = 'ja_JP.UTF-8'# locale for number formatting
lc_time = 'ja_JP.UTF-8'# locale for time formatting
--------------------------------------------------------------------------------------------
6.RUN(locale-C) 
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'C'# locale for system error message
# strings
lc_monetary = 'C'# locale for monetary formatting
lc_numeric = 'C'# locale for number formatting
lc_time = 'C'# locale for time formatting
--------------------------------------------------------------------------------------------
7.RUN(locale-ja_JP.utf8 ) 
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'ja_JP.utf8'# locale for system error message
# strings
lc_monetary = 'ja_JP.utf8'# locale for monetary formatting
lc_numeric = 'ja_JP.utf8'# locale for number formatting
lc_time = 'ja_JP.utf8'# locale for time formatting
--------------------------------------------------------------------------------------------



ダウンロードできます

posted by a23 at 12:40| Comment(0) | PostgreSQL

Database encoding

Database encoding

The database postgres is created to store data using the SQL_ASCII encoding. This encoding is defined for 7 bit characters only; the meaning of characters with the 8th bit set (non-ASCII characters 127-255) is not defined. Consequently, it is not possible for the server to convert the data to other encodings. 
If you're storing non-ASCII data in the database, you're strongly encouraged to use a proper database encoding representing your locale character set to take benefit from the automatic conversion to different client encodings when needed. If you store non-ASCII data in an SQL_ASCII database, you may encounter weird characters written to or read from the database, caused by code conversion problems. This may cause you a lot of headache when accessing the database using different client programs and drivers. 
For most installations, Unicode (UTF8) encoding will provide the most flexible capabilities. 

003.png

RUNファイルから(ロケール C)でインストールした、サーバーに、リモートのpgAdmin3tからアクセスすると、最初に警告が。
posted by a23 at 12:07| Comment(0) | PostgreSQL