public inbox for [email protected]  
help / color / mirror / Atom feed
From: Karel Zak <[email protected]>
To: Halley Pacheco de Oliveira <[email protected]>
Cc: [email protected]
Subject: Re: to_ascii function
Date: Mon, 7 Jun 2004 11:16:08 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Sat, Jun 05, 2004 at 10:39:15AM -0300, Halley Pacheco de Oliveira wrote:
> This query didn't work as I was expecting. Any reasons
> for that ?
> 
> SELECT TO_ASCII('ÁÉÍÓÚáéíóú??°')
> 
> result -> 'AEIOUaeioua  '
> 
> I used psql, java and phpPgAdmin without success.
> 
> (PostgreSQL 7.4.2 encoding latin1)

 Are all chars  in your query LATIN1  symbols and are you  sure that all
 used  chars  have counterpart  in  ASCII? For  this to_ascii()  support
 LATIN1, LATIN2  and WIN1250 only. I'm  not sure if  there is a  way how
 convert others special chars (for example some Asiatic encodings).

 # show server_encoding;
 server_encoding 
 -----------------
 LATIN1

 # show client_encoding;
 client_encoding 
 -----------------
 LATIN1

 # SELECT '>>' || TO_ASCII('ÁÉÍÓÚáéíóú??°') || '<<';
     ?column?      
 -------------------
 >>AEIOUaeiou?? <<
 

 The last char  in the string is dec 176 (hex 0xB0). Which  char do you
 expect after conversion to ASCII (0-127)?

    Karel

-- 
 Karel Zak  <[email protected]>
 http://home.zf.jcu.cz/~zakkr/



view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: to_ascii function
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox