[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 <emilu(at)encs(dot)concordia(dot)ca></i></b> escreveu:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>><br>><br>>> I'm using postGre with tables which contain French character <br>>> (?????...). Is there a fonction which performs a like in replacing ? <br>>> (e cute) by e ?<br>><br>> 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: conversão de condificação de UTF8 para ASCII não é suportada<br><br>bdteste=# select to_ascii('ê','LATIN1');<br> to_ascii<br>----------<br> Aa<br>(1 registro)<br><br>bdteste=# SELECT convert('ê', 'UTF8', 'LATIN1');<br> convert<br>---------<br><br>(1 registro)<br><br>bdteste=# SELECT to_ascii(convert('ê', 'UTF8', 'LATIN1'));<br>ERRO: conversão de condificação de UTF8 para ASCII não é suportada<br><br>bdteste=# SELECT to_ascii(convert('ê', 'UTF8', 'LATIN1'), 'LATIN1');<br> to_ascii<br>----------<br> e<br>(1 registro)<br><br>[]s<br>Osvaldo<br><br><p> 
<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