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

Home -> Community -> Usenet -> c.d.o.tools -> Entering and reading varchar in HEX

Entering and reading varchar in HEX

From: Tuan <tuanglen_at_hotmail.com>
Date: 8 Aug 2001 20:41:38 -0700
Message-ID: <df045d93.0108081941.1b057a80@posting.google.com>

Apologies for my very limited knowledge of Oracle. Internationalization is my specialty, but I need to know this part when I work with real DBAs.

When building a system that uses Oracle 8i, I want to be able to directly insert known bytes into a varchar and directly view the bytes in a varchar without having to bother with visible characters, so that I can debug international systems from anywhere with any setup.

I want to get below the abstraction of the text entry and rendering systems of the intermediate software systems and work directly with the bytes in the database.

For example, there are certain Japanese characters or Korean characters that I can read and write directly in hex in several different text encodings. If I'm working with a DBA, and he's running some version of SQL-plus on on some Solaris box, probably in a US locale, via a Foo-brand terminal emulator on some Macintosh laptop...how do I enter Japanese text into a varchar in the database? He's not likely to have Japanese support on his Mac, but even if he does, it won't survive the passage thru most terminal emulators, unix utilities, etc.

Forget it. I know the actual bytes I need, so now all I need to know is what SQL to type to enter those bytes directly in hex into the varchar.

On the flip side, suppose I enter some Chinese into a Web form that is supposed to pass it thru a long chain of systems, ultimately landing in a varchar in the database. Now, I want to see what's in that varchar using some terminal emulator that couldn't possibly display Chinese. I wouldn't trust it anyway. I want to see what actual bytes just got deposited, displayed in hex, not text.

Custom functions won't help me much. I need something I can count on being there on every Oracle 8i installation.

What's the simplest SQL expression for "insert C3B1 into <some varchar>" and the simplest SQL expression that would output "C3B1" from some varchar if that's what it contained?

Thanks. Received on Wed Aug 08 2001 - 22:41:38 CDT

Original text of this message

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