Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

[no subject]



Notes on table 9-6. Other String Functions:
"The to_ascii function supports conversion from LATIN1, LATIN2, LATIN9, and WIN1250 encodings only. "

Try convert encoding:

bdteste=# \set
VERSION = 'PostgreSQL 8.1.4 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3)'
....
ENCODING = 'UTF8'
......

bdteste=# select to_ascii('ê');
ERRO:  conversão de condificação de UTF8 para ASCII não é suportada

bdteste=# select to_ascii('ê','LATIN1');
 to_ascii
----------
 Aa
(1 registro)

bdteste=# SELECT convert('ê', 'UTF8', 'LATIN1');
 convert
---------

(1 registro)

bdteste=# SELECT to_ascii(convert('ê', 'UTF8', 'LATIN1'));
ERRO:  conversão de condificação de UTF8 para ASCII não é suportada

bdteste=# SELECT to_ascii(convert('ê', 'UTF8', 'LATIN1'), 'LATIN1');
 to_ascii
----------
 e
(1 registro)

[]s
Osvaldo


 		
---------------------------------
 O Yahoo! está de cara nova. Venha conferir!
--0-1954878062-1153249550=:11142
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<br><b><i>Emi Lu &lt;emilu(at)encs(dot)concordia(dot)ca&gt;</i></b> escreveu:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>&gt;<br>&gt;<br>&gt;&gt; I'm using postGre with tables which contain French character <br>&gt;&gt; (?????...). Is there a fonction which performs a like in replacing ? <br>&gt;&gt; (e cute) by e ?<br>&gt;<br>&gt; to_ascii() should helps you<br><br>I got the following error:<br><br>select to_ascii('ê');<br>ERROR:  encoding conversion from UNICODE to ASCII not supported<br><br>Some comments about it.<br><br></blockquote><br><br>From the docs:<br>http://www.postgresql.org/docs/8.1/interactive/functions-string.html#FTN.AEN7612<br><br>Notes on table 9-6. Other String Functions:<br>"The to_ascii function supports conversion from LATIN1, LATIN2, LATIN9, and WIN1250 encodings only. "<br><br>Try convert encoding:<br><br>bdteste=# \set<br>VERSION = 'PostgreSQL 8.1.4 on i386-redhat-linux-gnu, compiled by
 GCC i386-redhat-linux-gcc (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3)'<br>....<br>ENCODING = 'UTF8'<br>......<br><br>bdteste=# select to_ascii('ê');<br>ERRO:&nbsp; conversão de condificação de UTF8 para ASCII não é suportada<br><br>bdteste=# select to_ascii('ê','LATIN1');<br>&nbsp;to_ascii<br>----------<br>&nbsp;Aa<br>(1 registro)<br><br>bdteste=# SELECT convert('ê', 'UTF8', 'LATIN1');<br>&nbsp;convert<br>---------<br><br>(1 registro)<br><br>bdteste=# SELECT to_ascii(convert('ê', 'UTF8', 'LATIN1'));<br>ERRO:&nbsp; conversão de condificação de UTF8 para ASCII não é suportada<br><br>bdteste=# SELECT to_ascii(convert('ê', 'UTF8', 'LATIN1'), 'LATIN1');<br>&nbsp;to_ascii<br>----------<br>&nbsp;e<br>(1 registro)<br><br>[]s<br>Osvaldo<br><br><p>&#32;
		<hr size=1> 
O Yahoo! está de cara nova. Venha <a href="http://us.rd.yahoo.com/mail/br/tagline/spirit/*http://br.yahoo.com/preview";>conferir</a>!
--0-1954878062-1153249550=:11142--



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group