Thread: psql on FreeBSD 4.7-RELEASE-p2 and greek (iso8859-7) chars

psql on FreeBSD 4.7-RELEASE-p2 and greek (iso8859-7) chars

From
Achilleus Mantzios
Date:
Hi,

I noticed that psql on FreeBSD (i checked also fbsd 4.5 with pgsql port
installed)
does not accept 8bit iso8859-* chars > 128 (where the greek chars are).

In linux that works ok, and i can update/insert/select values
using greek strings.

I know it must be a fbsd/locale issue, but it would be nice
if someone knew something about it.

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr


Re: [SQL] psql on FreeBSD 4.7-RELEASE-p2 and greek (iso8859-7) chars

From
Ian Barwick
Date:
On Thursday 21 November 2002 12:38, Achilleus Mantzios wrote:
> Hi,
>
> I noticed that psql on FreeBSD (i checked also fbsd 4.5 with pgsql port
> installed)
> does not accept 8bit iso8859-* chars > 128 (where the greek chars are).
>
> In linux that works ok, and i can update/insert/select values
> using greek strings.
>
> I know it must be a fbsd/locale issue

It is.

> but it would be nice
> if someone knew something about it.

Are you able to input Greek characters in the shell you call
psql from? Do you have any LC_ environment variables set?

The FreeBSD handbook has a useful section on this:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/l10n.html

HTH

Ian Barwick
barwick@gmx.net


Re: [SQL] psql on FreeBSD 4.7-RELEASE-p2 and greek (iso8859-7) chars

From
Achilleus Mantzios
Date:
On Thu, 21 Nov 2002, Ian Barwick wrote:

> On Thursday 21 November 2002 12:38, Achilleus Mantzios wrote:
> > Hi,
> >
> > I noticed that psql on FreeBSD (i checked also fbsd 4.5 with pgsql port
> > installed)
> > does not accept 8bit iso8859-* chars > 128 (where the greek chars are).
> >
> > In linux that works ok, and i can update/insert/select values
> > using greek strings.
> >
> > I know it must be a fbsd/locale issue
>
> It is.
>
> > but it would be nice
> > if someone knew something about it.
>
> Are you able to input Greek characters in the shell you call
> psql from? Do you have any LC_ environment variables set?

I have no LC_*, LANG env vars set.

I can type greek from cat,vim, etc...

Also setting EDITOR to vim
i can \e from psql and write greek chars.

So, maybe it is psql related and not FreeBSD.
Even vi accepts greek in FreeBSD (with their hex representation),
but psql not even seems to allow the 1st bit set of the chars.
(it thinks its a control char).

Could it be FreeBSD readline/locale "C" related??

>
> The FreeBSD handbook has a useful section on this:
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/l10n.html
>
> HTH
>
> Ian Barwick
> barwick@gmx.net
>
>

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr


Re: [SQL] psql on FreeBSD 4.7-RELEASE-p2 and greek (iso8859-7) chars

From
Achilleus Mantzios
Date:
On Thu, 21 Nov 2002, Ian Barwick wrote:

> On Thursday 21 November 2002 12:38, Achilleus Mantzios wrote:
> > Hi,
> >
> > I noticed that psql on FreeBSD (i checked also fbsd 4.5 with pgsql port
> > installed)
> > does not accept 8bit iso8859-* chars > 128 (where the greek chars are).
> >
> > In linux that works ok, and i can update/insert/select values
> > using greek strings.
> >
> > I know it must be a fbsd/locale issue
>
> It is.

Thats right.

Just a
setenv LANG el_GR.ISO8859-7
did the trick.

However i noticed that ANY LANG value whould do.
libc (or glibc in linux) just need LANG not to be empty.

>
> HTH
>
> Ian Barwick
> barwick@gmx.net
>
>

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr


Re: [SQL] psql on FreeBSD 4.7-RELEASE-p2 and greek (iso8859-7) chars

From
Manuel Sugawara
Date:
Achilleus Mantzios <achill@matrix.gatewaynet.com> writes:

> Hi,
>
> I noticed that psql on FreeBSD (i checked also fbsd 4.5 with pgsql port
> installed)
> does not accept 8bit iso8859-* chars > 128 (where the greek chars are).
>
> In linux that works ok, and i can update/insert/select values
> using greek strings.
>
> I know it must be a fbsd/locale issue, but it would be nice
> if someone knew something about it.

If pgsql is using readline adding

  set meta-flag on
  set convert-meta off
  set output-meta on

to /etc/inputrc or ~/.inputrc could help. See readline(3).

Regards,
Manuel.