I have an UMLAUT table. Pretty simple really…
CREATE TABLE "HR"."UMLAUT" ( "CHARACTERS" VARCHAR2(2) ) ; REM INSERTING INTO UMLAUT SET DEFINE OFF; INSERT INTO UMLAUT (CHARACTERS) VALUES ('Ñ'); INSERT INTO UMLAUT (CHARACTERS) VALUES ('Ä'); INSERT INTO UMLAUT (CHARACTERS) VALUES ('Ñ'); COMMIT;
Looks great in SQLDev, but not so much in SQLcl…
Everything is UNICODE by default in Java applications. It’s converted to Unicode coming in and going out… [docs]
This is a HUGE advantage in the Java world. We don’t have to do anything special when it comes to supporting Unicode.
So what’s happening above?
Windows CMD by default isn’t setup to use a Unicode code page.
So yeah, that’s not going to work.
UNTIL you do this.
The CHCP command changes the code page for the CMD window. And the 65001 code page is for UTF-8.
But, you probably don’t want to have to do this every time you open a CMD window.
So, buy a Mac and use a proper BASH shell environment 😉
Or, you can follow the advice here on StackOverflow. You basically edit the Windows registry to start CMD out with the Unicode code page.