to_ascii()

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: pgsql-patches <pgsql-patches(at)postgreSQL(dot)org>
Subject: to_ascii()
Date: 2000-08-04 14:39:28
Message-ID: Pine.LNX.3.96.1000804151847.13077G-101000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


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

Attachment Content-Type Size
to_ascii-08042000.patch.gz application/x-gzip 1.8 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2000-08-04 15:45:22 Re: to_ascii()
Previous Message Stephan Szabo 2000-07-30 20:44:19 Some Foreign Key fixes