Unix Technical Forum

OS Locale UTF-8

This is a discussion on OS Locale UTF-8 within the Pgsql Patches forums, part of the PostgreSQL category; --> I have access to a system with locale of UTF-8. cvstip would no longer initdb on this system, as ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:14 AM
Simon Riggs
 
Posts: n/a
Default OS Locale UTF-8

I have access to a system with locale of UTF-8. cvstip would no longer
initdb on this system, as a result of recent renaming of UTF-8 to UTF8.

i.e.
[userid@systemname ~]$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

OS is Fedore Core 3.

Attached patch adds UTF-8 as a synonym for UTF8, so initdb works again
without needing to specify an encoding, just like it used to.

Whatever we call UTF*8, there will always be somebody who says
different.

Best regards, Simon Riggs


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 12:14 AM
Andrew Dunstan
 
Posts: n/a
Default Re: OS Locale UTF-8


This would explain the similar failure that I reported and didn't get
around to digging into. Excellent.

andrew

Simon Riggs wrote:

>I have access to a system with locale of UTF-8. cvstip would no longer
>initdb on this system, as a result of recent renaming of UTF-8 to UTF8.
>
>i.e.
>[userid@systemname ~]$ locale
>LANG=en_US.UTF-8
>LC_CTYPE="en_US.UTF-8"
>LC_NUMERIC="en_US.UTF-8"
>LC_TIME="en_US.UTF-8"
>LC_COLLATE="en_US.UTF-8"
>LC_MONETARY="en_US.UTF-8"
>LC_MESSAGES="en_US.UTF-8"
>LC_PAPER="en_US.UTF-8"
>LC_NAME="en_US.UTF-8"
>LC_ADDRESS="en_US.UTF-8"
>LC_TELEPHONE="en_US.UTF-8"
>LC_MEASUREMENT="en_US.UTF-8"
>LC_IDENTIFICATION="en_US.UTF-8"
>LC_ALL=
>
>OS is Fedore Core 3.
>
>Attached patch adds UTF-8 as a synonym for UTF8, so initdb works again
>without needing to specify an encoding, just like it used to.
>
>Whatever we call UTF*8, there will always be somebody who says
>different.
>
>Best regards, Simon Riggs
>
>
>------------------------------------------------------------------------
>
>Index: initdb.c
>================================================= ==================
>RCS file: /projects/cvsroot/pgsql/src/bin/initdb/initdb.c,v
>retrieving revision 1.79
>diff -d -c -r1.79 initdb.c
>*** initdb.c 14 Mar 2005 18:31:23 -0000 1.79
>--- initdb.c 11 Apr 2005 23:12:25 -0000
>***************
>*** 721,726 ****
>--- 721,727 ----
> {PG_JOHAB, "???"},
> #endif
>
>+ {PG_UTF8, "UTF-8"},
> {PG_UTF8, "UTF8"},
> {PG_UTF8, "utf8"},
>
>
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 12:14 AM
Peter Eisentraut
 
Posts: n/a
Default Re: OS Locale UTF-8

Am Dienstag, 12. April 2005 01:24 schrieb Simon Riggs:
> Attached patch adds UTF-8 as a synonym for UTF8, so initdb works again
> without needing to specify an encoding, just like it used to.


Well, to redeem myself, the whole thing got screwed up by some mindless
editing during the great encoding renaming:

http://developer.postgresql.org/cvsw...1=1.76;r2=1.77

We just need to revert the wrong parts of that patch, not add anything.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 12:14 AM
Peter Eisentraut
 
Posts: n/a
Default Re: OS Locale UTF-8

Am Dienstag, 12. April 2005 01:24 schrieb Simon Riggs:
> I have access to a system with locale of UTF-8. cvstip would no longer
> initdb on this system, as a result of recent renaming of UTF-8 to UTF8.


Fixed.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:39 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com