Character Set & Globalization

Character Set & Globalization

DOAG Konferenz + Ausstellung 18.11.2014 Nürnberg Character Set & Globalization Martin Hoermann [email protected] www.ordix.de Character Set & Globalization „Das Alpha und das Omega, der Erste und der Letzte, der Anfang und das Ende “ Offenbarung des Johannes (Kap. 22,13) Character Set und Globalization, Martin Hoermann, DOAG 2014 1 Gut zu wissen… http://www.interessante.verweise/ FAQ: 340512.1 Timestamp Details … Infos zum Nachschlagen Literatur http://www.buch.de Wo ist Larry? Character Set und Globalization, Martin Hoermann, DOAG 2014 2 Character Sets U+2318 place of interest http://www.fileformat.info/ Character Set und Globalization, Martin Hoermann, DOAG 2014 3 Character Set Encoding (ISO/IEC 8859-1) Hermes Baby: http://www.typewriters.ch/images/hermes_baby_jubilee_gr.jpg Character Set und Globalization, Martin Hoermann, DOAG 2014 4 Wichtige Character Sets / Encodings Oracle Pendant . ISO 8859-1 WE8ISO8859P1 . ISO 8859-15 WE8ISO8859P15 . CP 1252 WE8MSWIN1252 . CP 850 . UTF-8 UTF8 / AL32UTF8 . UTF-16 AL16UTF16 Oracle Äquivalent Character Set und Globalization, Martin Hoermann, DOAG 2014 5 Character Set & Oracle Betriebssystem Programme Editoren Fonts NLS_LANG Transfer Character-Set- Datenbank Betriebssystem Programme Editoren NLS_LANG Character Set und Globalization, Martin Hoermann, DOAG 2014 6 NLS_LANG NLS_LANG = GERMAN __ GERMANY . WE8ISO8859P1 Character Set (Client) Territory (Client + Datenbank) Date format Decimal character and group separator Local currency symbol ISO currency symbol Dual currency symbol First day of the week Credit and debit symbols ISO week flag List separator Language (Client + Datenbank) Language for server messages Language for day and month names and their abbreviations Symbols for equivalents of AM, PM, AD, and BC. Default sorting sequence for character data Writing direction Affirmative and negative response strings (for example, YES and NO) NLS_LANG = .WE8ISO8859P1 Kurzform Character Set und Globalization, Martin Hoermann, DOAG 2014 7 Character Set & Oracle NLS_LANG SELECT sid, serial#, client_charset FROM V$SESSION_CONNECT_INFO; SELECT * FROM V$NLS_PARAMETERS WHERE parameter LIKE '%CHARACTERSET%' ORDER BY parameter; Character Set und Globalization, Martin Hoermann, DOAG 2014 8 Character-Set - Datenbank Changing Or Choosing the Database Character Set ( NLS_CHARACTERSET ) (Doc ID 225912.1) Character Set und Globalization, Martin Hoermann, DOAG 2014 9 Invalid Data ISO-8859-1 ISO-8859-7 Character Set und Globalization, Martin Hoermann, DOAG 2014 10 Invalid Data Pass Through Configuration Encoding: EL8ISO8895P7 WE8ISO8895P1 NLS_LANG: .WE8ISO8859P1 Character Set und Globalization, Martin Hoermann, DOAG 2014 11 Conversion Errors & Replacement Character U+FFFD Unbekannte und ungültige Zeichen im Quell-Character-Set werden zum Replacement Character konvertiert Character Set und Globalization, Martin Hoermann, DOAG 2014 12 Conversion Errors Encoding: EL8ISO8895P7 WE8ISO8895P1 NLS_LANG: .EL8ISO8859P7 Character Set und Globalization, Martin Hoermann, DOAG 2014 13 Konvertierung „proben“ SELECT convert( zeichen, 'WE8ISO8859P1', 'EL8ISO8859P7' ) FROM charset_iso_8859_p1; Character Set und Globalization, Martin Hoermann, DOAG 2014 14 Kodierung eines Character Set U+2A6A5 Drachen, Drachen, Drachen, Drachen Character Set und Globalization, Martin Hoermann, DOAG 2014 15 Character-Set-Kodierung „Im Anfang (ἀρχή) war das Wort (λόγος) und das Wort war bei Gott, und das Wort war Gott.“ Johannesevangelium, Prolog Character Set und Globalization, Martin Hoermann, DOAG 2014 16 Character Set Encoding (ISO/IEC 8859-1) Character Set und Globalization, Martin Hoermann, DOAG 2014 17 Unicode vs. Encoding AL32UTF8 / UTF8 (Unicode) Database Character Set Implications (Doc ID 788156.1) Character Set und Globalization, Martin Hoermann, DOAG 2014 18 UTF-8 nach Unicode SELECT zeichen, dump( zeichen ) FROM T06_8859P1 WHERE zeichen IN( 'Ä', 'ß' ); 1: 19510 13210 2: 11000011 10000100 3: 00011000100 4: 19610 = 0xC4 5: U+00C4 Character Set und Globalization, Martin Hoermann, DOAG 2014 19 Übung U+004C U+0061 U+0072 U+0072 U+0079 U+0045 U+006C U+006C U+0069 U+0073 U+006F U+006E Character Set und Globalization, Martin Hoermann, DOAG 2014 20 Wo ist Larry? Lawrence „Larry“ Joseph Ellison Larry = U+004C U+0061 U+0072 U+0072 U+0079 Ellison = U+0045 U+006C U+006C U+0069 U+0073 U+006F U+006E DECLARE -- Konvertierung von ASCII-Zeichen nach Unicode vc VARCHAR2(200) := 'Ellison'; vc_zeichen VARCHAR2(1); vc_out VARCHAR2(1000); BEGIN FOR i IN 1..length( vc ) LOOP vc_zeichen := substr( vc, i, 1 ); vc_out := vc_out || ' U+' || trim( to_char( ascii( vc_zeichen ), '000X' )); END LOOP; dbms_output.put_line( vc || ' = ' || vc_out ); END; / Character Set und Globalization, Martin Hoermann, DOAG 2014 21 Dump SELECT zeichen, dump( zeichen, 1016 ) FROM T06_8859P1 WHERE zeichen IN( 'Ä', 'ß' ); Character Set und Globalization, Martin Hoermann, DOAG 2014 22 Wie wird der Character Set bestimmt? U+212E Estimated Symbol Character Set und Globalization, Martin Hoermann, DOAG 2014 23 Betriebssystem . Windows: abhängig von Ländereinstellungen (z.B. CP1252) . DOS: bestimmt durch chcp (z.B. Code Page 850) . Unix/Linux: durch LANG Character Set und Globalization, Martin Hoermann, DOAG 2014 24 SQL*Developer Character Set und Globalization, Martin Hoermann, DOAG 2014 25 TOAD Character Set und Globalization, Martin Hoermann, DOAG 2014 26 Ultra Compare Ultra Compare bestimmt die Kodiderung einer Datei automatisch, wird beispielsweise das Rote Zeichen im Screenshot gefunden, so nimmt das Tool eine bestimmte Kodierung an (hier MAC-UTF-8). Die Kodierung lässt sich einstellen. Character Set und Globalization, Martin Hoermann, DOAG 2014 27 Unicode in der Datenbank Character Set und Globalization, Martin Hoermann, DOAG 2014 28 Unicode Character Sets Character Set Name RDBMS Version Unicode Version AL24UTFFSS 7.2-8.1 1.1 2.1 (8.0-8.1.6) UTF8 8.0-12c 3.0 (8.1.7-12.1) 2.1 (8.0-8.1.6) UTFE 8.0-12c 3.0 (8.1.7-12.1) 3.0 (9.0) 3.1 (9.2) AL32UTF8 3.2 (10.1) 9.0-12c AL16UTF16 4.01 (10.2) 5.0 (11.1 and 11.2) 6.1 (12.1). Unicode Character Sets In The Oracle Database (Doc ID 260893.1) Character Set und Globalization, Martin Hoermann, DOAG 2014 29 Character-Set-Einstellungen . V$NLS_PROPERTIES . NLS_CHARACTERSET . CHAR . VARCHAR2 . LONG . CLOB (in Multibyte-Zeichensätzen immer AL16UTF16 Big Endian) . Objektnamen und PL/SQL Code . NLS_NCHAR_CHARACTERSET . NCHAR . NVARCHAR2 . NCLOB Character Set und Globalization, Martin Hoermann, DOAG 2014 30 NLS_LENGTH_SEMANTIC . Maximal 1.500 Zeichen VARCHAR2( 1500 CHAR ) . Maximal 4.000 Bytes . Maximal 32.767 Bytes (12c) . MAX_STRING_SIZE = EXTENDED NLS_LENGTH_SEMANTICS . VARCHAR2, NVARCHAR2, RAW The National Character Set ( NLS_NCHAR_CHARACTERSET ) in Oracle 9i, 10g , 11g and 12c (Doc ID 276914.1) Character Set und Globalization, Martin Hoermann, DOAG 2014 31 UTF8 in SQL*Plus Character Set und Globalization, Martin Hoermann, DOAG 2014 32 Character Set ändern U+1F4BE Character Set und Globalization, Martin Hoermann, DOAG 2014 33 Update Character Set „There are still "dba's" out there who try to change the NLS_CHARACTERSET or NLS_NCHAR_CHARACTERSET by updating props$ . This is NOT supported and WILL corrupt your database. This is one of the best way's to destroy a complete dataset. Oracle Support will TRY to help you out of this but Oracle will NOT warrant that the data can be recovered or recovered data is correct. You WILL be asked to do a FULL export and a complete rebuild of the database. Please, do NOT update props$.“ Changing Or Choosing the Database Character Set ( NLS_CHARACTERSET ) (Doc ID 225912.1) Character Set und Globalization, Martin Hoermann, DOAG 2014 34 Character Set ändern . Export / Import . CSSCAN / CSALTER . Database Migration Assistant for Unicode (DMU) Character Set und Globalization, Martin Hoermann, DOAG 2014 35 DMU Startseite Character Set und Globalization, Martin Hoermann, DOAG 2014 36 DMU Features . GUI -geführte Migration . Vorteile: . In Place . Data Validation / Cleansing Editor . Behebung von Pass-Through-Konfigurationen (je Spalte) . Ausschluss der Migration (je Spalte) . Zu beachten: . manuelle Tätigkeiten bzgl. Data Dictionary . nur Unicode als Ziel Character Set und Globalization, Martin Hoermann, DOAG 2014 37 DMU Pass-Through-Konfiguration Character Set und Globalization, Martin Hoermann, DOAG 2014 38 DMU Fehler im Data Dictionary SELECT table_name , convert( table_name, 'AL32UTF8' ) konvertiert FROM user_tables WHERE convert( table_name, 'AL32UTF8' ) <> table_name; Character Set und Globalization, Martin Hoermann, DOAG 2014 39 DMU Migration Ausnahmen Character Set und Globalization, Martin Hoermann, DOAG 2014 40 DMU Finish http://blogs.loopback.org/wp-content/uploads/2013/11/DOAG_2013_Unicode_V_1.0.pdf Character Set und Globalization, Martin Hoermann, DOAG 2014 41 Unicode (U+FDFA) U+FDFA SALLALLAHOU ALAYHE WASALLAM Mögen Allahs Segen und Frieden auf ihm sein Character Set und Globalization, Martin Hoermann, DOAG 2014 42 Unicode Themenauswahl . Glyphen vs. Zeichen . Diakritische Zeichen . Ligaturen & Digraphen . Carriage Return vs. Line Feed . Komposition . Schreibrichtung . BOM Character Set und Globalization, Martin Hoermann, DOAG 2014 43 Glyphen vs. Zeichen Character Set und Globalization, Martin Hoermann, DOAG 2014 44 Zeichen U+0041 Latin A U+FF21Halfwidth Latin A U+0391 GREEK CAPITAL LETTER ALPHA U+0410 Cyrillic Capital Letter A Character Set und Globalization, Martin Hoermann, DOAG 2014 45 Diakritische Zeichen www.wikipedia.de Character Set und Globalization, Martin Hoermann, DOAG 2014 46 Komposition

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    78 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us