[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: locale (PostgreSQL & Hebrew Charset)



On Tue, 26 Dec 2000, Ben-Nes Michael wrote:

> It seems that locale will work though it will reduce speed :(

BTW: what are the pros and cons of using UTF-8 for your application? (this
still does not handle sorting etc., of course)

I looked at
http://postgresql.readysetnet.com/devel-corner/docs/admin/multibyte.htm
and I don't see there anything about the iso8859-8 encoding.

> 
> in locale i have two intresting option
> 
> hebrew
> iw_IL
> 
> any one know what is the diffrence ?

"iw" is deprecated ("iwrit", even though it is written with bet, and not
with vav), you should use "he". 

The locale should also include the courtry name (i.e.: he_IL).  Actually
it can include the character set as well (i.e.: the current locale is
he_IL.ISO-8859-8, but in the future there may be he_IL.UTF-8)  However,
there is currently no other "he" locale (at least not in glibc), and ths
in practice "he" is a safe choice.

However, when I look at /usr/share/locale.alias (that's the one by glibc)
at my computer, I only see: 

hebrew          iw_IL.ISO-8859-8

(I have a "he" locale on my system. That is what comes with glibc (at
least the one that comes with mandrake. in the original glibc tarball I
see a locale file called "he_IL")

>From /usr/lib/X11/locale/locale.alias :
he                                              he_IL.ISO8859-8
he_IL                                           he_IL.ISO8859-8
he_IL.iso88598                                  he_IL.ISO8859-8
# iw was the old iso code for hebrew (now he)
# those lines should be deleted in a near future
iw                                              he_IL.ISO8859-8
iw_IL                                           he_IL.ISO8859-8
iw_IL.iso88598                                  he_IL.ISO8859-8

> 
> Tzafrir Cohen wrote:
> 
> > On Mon, 25 Dec 2000, Ben-Nes Michael wrote:
> >
> > > Hi
> > >
> > > does any one know if postgresl (7) support hebrew charset ? (sorting,
> > > group ... )
> > > If so, what is the way to enable it ?
> >
> > Can't give you a direct answer, but:
> >
> > Does pgsql uses localized glibc functions? see locale (7).
> >
> > If so: set the LANG (or just some appropriate LC_* vars) to "he" (or
> > "he_IL" or whatever)
> >
> > Although setting the language for the whole process may not be desirable
> > for such an application.

Accrding to the page referenced by Heruth:
http://postgresql.readysetnet.com/devel-corner/docs/admin/charset.htm#LOCALE

This is how it should be done

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il