8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Misc » Here

Comments for Character Semantics And Globalization in Oracle


Sven said...

when we did
alter system set nls_length_semantics=char;
we had to restart the engine, the next session had nls_length_semantics=byte again and the %char% ddl were 1 byte per character.
So we decided to do:
1. explicitly assign char to %char% ddl columns
2. or alter session set nls_length_semantics = 'CHAR'
------------
Greetings

george said...

thanks for the explanation.

Samir Waghu said...

Our DB NLS Params are as below

NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET UTF8
NLS_RDBMS_VERSION 9.2.0.4.0


Created a table as below
CREATE TABLE SAMIR_UTF8_TEST(
ID_TEST VARCHAR2(100 CHAR),
TEST_DESC VARCHAR2(4000 CHAR)

);
But when we try to add a MS-Word text (3916 chars) with MS-Word smart quotes it fails insetion/updation.

Anything I am doing wrong???

Vadim said...

I've tried:

CREATE TABLE tab3 (
id NUMBER(10),
description VARCHAR2(20 CHAR)
);

NLS_LENGTH_SEMANTICS = BYTE

Table is created, but column is created with VARCHAR2(80), not with VARCHAR2(20 CHAR).
What's wrong?


Vadim said...

Sorry, the table was created by SYS user.
When I logged in by another user, all is OK.

Paul said...

Hi Tim,

So don't stop there. Can you provide an example when would there be a case to use instrb/substringb/lengthb? We are having issues with "ORA-29275: partial multibyte character" and wondering if (and specifically how) these would be used to help reconcile this problem?

DO NOT ask technical questions here! They will be deleted!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

If you post personal information (name, email address etc.) you are agreeing to them being stored and displayed. Feel free to remain anonymous.