Bug 84779

Summary: Switch default encodings to Unicode?
Product: [Retired] Red Hat Linux Reporter: Tim Landscheidt <tim>
Component: postgresqlAssignee: Andrew Overholt <overholt>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: mitr
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-03-27 22:23:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Landscheidt 2003-02-21 10:41:32 UTC
It seems that by default the Postgresql server and frontend use the SQL_ASCII 
encoding. Given the Red Hat quest for Unicode "domination" :-), wouldn't it be 
better to switch defaults to Unicode? 
 
Besides, a utf-8 terminal and a psql using SQL_ASCII encoding do not get along 
very well :-(. 
 
Suggestions: 
 
- Switch initdb's default encoding to Unicode. 
- For psql, either: 
  - have a /etc/skel/.psqlrc with "\encoding utf-8" (does not affect existing 
users :-() 
  - add some magic to psql to determine whether the controlling tty has 
Unicode capability and set encoding accordingly (quick hack: check if LANG 
ends with ".UTF-8"?)

Comment 1 Andrew Overholt 2003-03-04 16:44:25 UTC
I will think about this.  Thanks for the suggestions.

Comment 2 Andrew Overholt 2003-03-27 22:23:08 UTC
For the time being (to maintain regression test passes, among other reasons), I
am going to keep the default encoding the way it is.  Client encoding can be
changed in dotfiles as you suggest.  Databases can be initialized with other
default encodings using `initdb --encoding=<encoding> -D <location of data
directory>`.