Home > Archive > PostgreSQL SQL > March 2006 > PostgreSQL Handling of Special Characters









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PostgreSQL Handling of Special Characters
Christian Paul B. Cosinas

2006-03-21, 3:32 am

Hi to all,

I am currently using PostgreSQL 8.0.3
My Database uses SQL_ASCII encoding.

I have a program in Visual Basic that connects to PostgreSQL using ODBC
Connection through File DSN.

I insert a text in one fields of my table.
For example, I insert a special character to that field.
Let's say a character of 150 ASCII code. Which looks like a hypen.

When I retrieve the value of that field it gives me a question mark
character instead of that 150 ASCII code character.

What could be the possible reason of this?
Is there a setting in the database configuration to understand that such
special characters?

Please..I really need an answer to this..

Thanks You.


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Markus Bertheau

2006-03-21, 3:32 am

2006/3/20, Christian Paul B. Cosinas <cpc@cybees.com>:

> Let's say a character of 150 ASCII code. Which looks like a hypen.
>
> When I retrieve the value of that field it gives me a question mark
> character instead of that 150 ASCII code character.
>
> What could be the possible reason of this?


Perhaps the ODBC driver thinks SQL_ASCII means ASCII and therefore
discards all bytes > 127. On PostgreSQL SQL_ASCII really means
SQL_ANYTHING, so to speak. Try to use for the database the encoding
you really use.

Markus Bertheau

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Christian Paul B. Cosinas

2006-03-21, 3:32 am

Hi Markus,

Can you please elaborate more on this.
I'm really lost.
Thank You So Much.

-----Original Message-----
From: Markus Bertheau & #91;mailto:mbertheau
.pg@googlemail.com]
Sent: Sunday, March 19, 2006 8:09 PM
To: Christian Paul B. Cosinas
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] PostgreSQL Handling of Special Characters

2006/3/20, Christian Paul B. Cosinas <cpc@cybees.com>:

> Let's say a character of 150 ASCII code. Which looks like a hypen.
>
> When I retrieve the value of that field it gives me a question mark
> character instead of that 150 ASCII code character.
>
> What could be the possible reason of this?


Perhaps the ODBC driver thinks SQL_ASCII means ASCII and therefore discards
all bytes > 127. On PostgreSQL SQL_ASCII really means SQL_ANYTHING, so to
speak. Try to use for the database the encoding you really use.

Markus Bertheau


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Eugene E.

2006-03-21, 3:32 am

Christian Paul B. Cosinas wrote:
> Hi Markus,
>
> Can you please elaborate more on this.
> I'm really lost.


Be sure that postgresql ITSELF is handling all chars transparently
except ZEROES.

Look for the error in the media layer

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Peter Eisentraut

2006-03-21, 3:32 am

Christian Paul B. Cosinas wrote:
> My Database uses SQL_ASCII encoding.


Do yourself a favor and use something else.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

PFC

2006-03-21, 3:32 am

[color=darkred]

I just received an email with all accented characters destroyed. UNICODE
should be the default for anything in 2006.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com