Re: to_ascii() - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: to_ascii()
Date
Msg-id 200008042049.QAA28463@candle.pha.pa.us
Whole thread Raw
In response to to_ascii()  (Karel Zak <zakkr@zf.jcu.cz>)
Responses Re: to_ascii()  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-patches
I had to back out the patch. It only compiles with multi-byte enabled.

Please submit a new patch.

> Applied.
>
> >
> >  to_ascii( text )
> >
> >     - encode 'text' from database encoding to ASCII
> >
> >     to_ascii('\256\341k')
> >
> >
> >  to_ascii( text, int4 )
> >
> >     - encode 'text' from 'int4' encoding to ASCII
> >
> >        to_ascii('\256\341k', 8)
> >
> >
> >  to_ascii( text, name )
> >
> >     - encode 'text' from 'name' encoding to ASCII
> >
> >       to_ascii('\256\341k', 'LATIN2')
> >
> >
> >   Now is supported LATIN1, LATIN2, WIN1250. For other character sets I
> > haven't good resources. Add new encoding is easy...
> >
> >  If encoding is not supported returns ERROR.
> >
> >  Note --- not exists total corect conversion to ASCII, this function try
> >     convert chars those is _probably_ interpret-able in ASCII for
> >     others use ' '. But for example for all Czech characters it is
> >     sufficient ... hmm Chinese / JAP and other complicated langs have
> >     bad luck here :-(
> >
> >                         Karel
> Content-Description:
>
> [ application/x-gzip is not supported, skipping... ]
>
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Karel Zak
Date:
Subject: Re: to_ascii()
Next
From: Peter Eisentraut
Date:
Subject: Re: some pedantic ANSI C fixes