Accented Characters with US7ASCII 
Author Message
 Accented Characters with US7ASCII
Is it possible to use accented characters with the US7ASCII charcacter set.
Specifically, I have Oracle 8, US7ASCII, and German, where I need to use
special german characters.

I know I can do this using the WEIISO charcacter sets, but I have a
restriction imposed, which means I must use the US7ASCII character set.

I will be happy if I can verify that I put the character into the database
and read the correct ascii value out of the database.

TIA

Keith Jamieson
Phoenix Technology Group



Sun, 20 Apr 2003 17:57:13 GMT
 Accented Characters with US7ASCII

Quote:
> Is it possible to use accented characters with the US7ASCII
charcacter set.
> Specifically, I have Oracle 8, US7ASCII, and German, where I need to
use
> special german characters.
> I will be happy if I can verify that I put the character into the
database
> and read the correct ascii value out of the database.

Hi Keith,
unfortunately, this is not possible. The character set US7ASCII has
only 128 chars, not including German umlauts.
Try this:
SQL> select convert('?', 'US7ASCII') from dual;
C
-
A
1 row selected.
SQL> select convert(convert('?', 'US7ASCII'), 'WE8ISO8859P9') from dual;
C
-
a
1 row selected.
As you can see, converting anything to US7ASCII results in information
loss.

HTH

Jose

--
-=[ Sancho ]=-

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 20 Apr 2003 19:44:07 GMT
 Accented Characters with US7ASCII
On Wed, 1 Nov 2000 10:57:13 +0100 , "Keith Jamieson"

Quote:

>Is it possible to use accented characters with the US7ASCII charcacter set.
>Specifically, I have Oracle 8, US7ASCII, and German, where I need to use
>special german characters.

>I know I can do this using the WEIISO charcacter sets, but I have a
>restriction imposed, which means I must use the US7ASCII character set.

>I will be happy if I can verify that I put the character into the database
>and read the correct ascii value out of the database.

You cannot do this. The US7ASCII character set is 7-bit only, and
includes no accented characters (or the British sign, which is the
problem which hit me...)

Any high-bit-set characters are replaced with '?'.

Essentially, the restriction on you says "your database can only use
ASCII characters", ie no accents.

Paul.



Sun, 20 Apr 2003 19:44:20 GMT
 Accented Characters with US7ASCII

Quote:

> Is it possible to use accented characters with the US7ASCII charcacter set.
> Specifically, I have Oracle 8, US7ASCII, and German, where I need to use
> special german characters.

"kind of"

If your client is set to US7ASCII then Oracle will do no conversion between
the client and server. If you store characters with the high bit set using
iso-8859-1 (WEIISO in oracle-speak) then they'll be stored as-is on the
server and retrieved as-is by your client. So it will "work".

However the server will still consider this data US7ASCII. If another client
connects with *any* other character set chosen, even WEIISO then the server
will feel compelled to "convert" the US7ASCII to WEIISO by stripping all the
high bits.

The server will also sort these characters "incorrectly" as far as standard
collation rules for iso-8859-1 etc.

So the question depends on whether you have control over every client you're
concerned about. And also whether the set of clients and character sets will
change in the future. It will be much harder to manage in the future if you
have a convention of storing random binary data in US7ASCII fields and not
using the Oracle features to deal with character sets.

--
greg



Sun, 20 Apr 2003 23:16:48 GMT
 Accented Characters with US7ASCII
Keith,

Have been dealing with something similar.  Here's what I can tell you.

- Even when the database is configured in US7ASCII, Oracle still stores
8-bits for each byte of data (hey, do you blame him?).
- You can put "8-bit" data into the database.  For example, you can
insert CHR(217) into a character field.  If you look at that value
using RAWTOHEX, you'll see X'D9' which converts to 217.  Neat--Oracle
stored your data, right?
- Yeah, but as far as he's concerned, you're not supposed to care about
that 8th bit.  So, when you select that value out of the database
you'll get capital "y" (i.e. "Y").  Happens to have an ASCII value = to
217-128 which is what conveniently happens when you strip the 8th bit
off, you're subtracting 128 from that binary value.
- To boot, if you export the data (using EXP) and then subsequently
import it (using IMP), you'll shreik in terror when you find out CHR
(217) turned into CHR(89), our buddy capital "Y".  Remember--Oracle
figured you didn't care about that 8th bit, so he lost it.  He was
being a nice guy to store it in the first place.

So, if you're application can "interpret" the ASCII codes stored in
your database and display what you want; and, if you're sure that
you'll never want to EXPort your database to have a backup, then you
may just be able to get away with it.  Otherwise, you are SOL until you
convert to an 8-bit charset.

Have fun.

Matt.



Quote:
> Is it possible to use accented characters with the US7ASCII
charcacter set.
> Specifically, I have Oracle 8, US7ASCII, and German, where I need to
use
> special german characters.

> I know I can do this using the WEIISO charcacter sets, but I have a
> restriction imposed, which means I must use the US7ASCII character
set.

> I will be happy if I can verify that I put the character into the
database
> and read the correct ascii value out of the database.

> TIA

> Keith Jamieson
> Phoenix Technology Group

Sent via Deja.com http://www.deja.com/
Before you buy.


Mon, 21 Apr 2003 07:09:52 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Characters beyond ASCII in database ( US7ASCII and UTF8 character set )

2. Converting Accented to Non-Accented Characters

3. Get Actual Of Accent Characters

4. Accent characters

5. Sort order - Accented Character

6. Accented characters

7. accented characters

8. Accented Characters

9. Accent characters in query

10. Accented Character Insensitivity v7.0

11. Accented Characters

12. BCP accented characters


 
Powered by phpBB® Forum Software