Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 84779 - Switch default encodings to Unicode?
Summary: Switch default encodings to Unicode?
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: postgresql
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Andrew Overholt
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-21 10:41 UTC by Tim Landscheidt
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-27 22:23:08 UTC


Attachments (Terms of Use)

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>`.


Note You need to log in before you can comment on or make changes to this bug.