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: Numeric values of Kanji characters

Re: Numeric values of Kanji characters

From: <esiyuri_at_my-dejanews.com>
Date: Thu, 08 Oct 1998 16:16:30 GMT
Message-ID: <6viogu$2kr$1@nnrp1.dejanews.com>


In article <6ve0p3$lf8$1_at_plug.news.pipex.net>,   "Mike Gould" <mike.gould_at_dial.pipex.com> wrote:

> Thanks for your response. I posed my question the wrong way round.
> What I meant was what range of numbers is accepted by chr() function in
> order to give Kanji characters, or conversely, what is the range of numbers
> output from the ASCII() function when fed with Kanji characters.

Mike, (copy sent by email)

have you got anywhere with this? I don't really know anything about Kanji, but reading through the manuals suggests to me that it is a two byte character set, which would therefore have a maximum decimal range of 0-65535.  I believe that the actual values are dependent on the character set that has been specified for your database. These character sets appear to be some "standard" (eg JA16EUC, JISX0208 or UTF2) rather than specific to Oracle. See the section on National Language Support in the Server Reference Manual.

However, I think that your plan to use ASCII() to get hold of this value will fail because (according to the manual) ASCII() "Returns the decimal representation in the database character set of the first byte of char."

The first byte will obviously only have a value in the range 0-255. I am not sure what you will get if you try CHR(X) where X is a value greater than 255. Have you tried this?

Have you tried using SUBSTRB() (note the 'B' at the end)... you may be able to use this to split a multi-byte string into individual bytes, which you could examine individually.

Not having access to a Kanji character set I have not been able to try any of this myself, but would be interested to hear what you come up with. I suspect that you may have to try a different approach altogether. If you could explain *why* you are trying to do your own indexing rather than using a standard Oracle index on the column you may get some more suggestions here.

--
Regards
Yuri McPhedran

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Oct 08 1998 - 11:16:30 CDT

Original text of this message

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