Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple UTF-8 issue

Re: Simple UTF-8 issue

From: Lothar Armbruester <lothar.armbruester_at_t-online.de>
Date: Tue, 7 Jan 2003 18:17:09 +0100
Message-ID: <PM0003B3A82D7D7426@hades.none.local>


Michel wrote:
> Hi,
>
> I've the following problem with my Oracle 9.2.0.1.0.
> The initial parameters are set to
>
> NLS_CHARACTERSET=UTF8 and
>
> NLS_NCHAR_CHARACTERSET=UTF8
>
> Does anybody know have a Unicode data has to be entered into the DB,
> for example
> if I wanna store '@', which has hex 0040. Do I have to enter '\u0040'
> (which is the unicode format in Java) or only '0040'??
>
> My problem is if I only enter '0040' I'll see later in my Java web
> application also '0040' and not '@'.
>
> any help is really appreciated.
>

Hello Michel,
try this:

insert into your_table values ('@');

Since ASCII is a kind of subset of unicode this should work. If you have some non-ASCII characters that is another story. You may have a look for the chr() function in the manual. At least single byte characters can can encoded like this:

insert into your_table values(chr(40));

The docs may help in inserting multibyte characters.

Hope that helps,
Lothar

-- 
Lothar Armbrüster       | la_at_oktagramm.de
Hauptstr. 26            | la_at_heptagramm.de
D-65346 Eltville        | lothar.armbruester_at_t-online.de
Received on Tue Jan 07 2003 - 11:17:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US