Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Character encoding and external tables

EdStevensJan 9 2015 — edited Jan 12 2015

Oracle 11.2.3.0 Std. Ed. ONE, 64-bit

Oracle Linux 5.6 64-bit

To quote Lloyd Bridges in the move Airplane, "I picked a bad day to give up sniffing glue".

Outside of ebcdic-ascii translations in my IBM mainframe days, I’ve never had to deal with character encoding issues before, so I’m not even sure of what I’m looking at here. Issue presented by one of my best developers.

Creating an external table to read a text file received from outside the organization. First sign of problem was when the developer tried to select from the table.

Using SQL Naviagator (not and Oracle product) the result looks like this:

pastedImage_1.png

Using SQL Developer, result looks like this:

pastedImage_2.png

Looking at the raw file in UltraEdit hex mode I see that the first two characters of the file are x’FF’ x’FE’, and every normal, printable character is followed by x’00’. So that first row first column shown above (from SQL Developer), with ‘E m a i l A d d r e s s’, in the file itself is as follows (hex strings)

FF FE 45 00 6d 00 61 00 69 00 6c 20 00 41 00 (etc, etc)

Have been reading “Handling Different Character Encoding Schemas” at https://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_control_file.htm#SUTIL1079, but am not making sense of it.

Guess I don’t have enough of a frame of reference to get started there.

**The ‘implementation rep’ from the company that supplies the file tells us it is “UTF-16 Little Endian”

All input, clarifications, comments, solutions welcome.

**

This post has been answered by Mark Williams-Oracle on Jan 10 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2015
Added on Jan 9 2015
4 comments
5,606 views