![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
While stranded on information super highway Sherman Lau wrote: In the current v8, DB2 support UTF-8 and UCS-2 in a Unicode database. Character fields such as char/varchar/long varchar/clob are encoded inUTF-8 and graphic fields such as graphic/vargraphic/long vargraphic/dbclob are encoded in UCS-2. The first 127 single-byte characters in UTF-8 isexactly the same as the ASCII invariant characters in ASCII code pages. These characters include 0-9, a-z, A-Z, and some symbols !, ", #, $, %, &, ', (, ), *, +,,, -,.,/,:,;,<,=,>,?,@,[,\,],^,_,`,{,|,},~ and [space].![]() ShermanSo how would you use different character set for different tables? ![]() "Hemant Shah" <shah (AT) typhoon (DOT) xnet.com> wrote in message news:bh9v09$cgf$1 (AT) flood (DOT) xnet.com...![]() > Folks,![]() > Does DB2 support multiple charsets?![]() > In Oracle you can set NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET > and declare a column as CHAR or NCHAR.![]() > We are planning to migrate our application to use Unicode and wouldlike to > use both ASCII and Unicode character at the same time.![]() ![]() ![]() > -- > Hemant Shah /"\ ASCII ribbon campaign > E-mail: NoJunkMailshah (AT) xnet (DOT) com \ / --------------------- > X against HTML mail > TO REPLY, REMOVE NoJunkMail / \ and postings > FROM MY E-MAIL ADDRESS. > -----------------[DO NOT SEND UNSOLICITED BULKE-MAIL]------------------ > I haven't lost my mind, Above opinions are mine only. > it's backed up on tape somewhere. Others can have their own.![]() ![]() -- Hemant Shah /"\ ASCII ribbon campaign E-mail: NoJunkMailshah (AT) xnet (DOT) com \ / --------------------- X against HTML mail TO REPLY, REMOVE NoJunkMail / \ and postings FROM MY E-MAIL ADDRESS. -----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------ I haven't lost my mind, Above opinions are mine only. it's backed up on tape somewhere. Others can have their own. |
#3
| |||
| |||
|
While stranded on information super highway Sherman Lau wrote: You can just create a table with character column or graphic column. DB2 Administration Guide has details about the Unicode implementation in DB2.![]() E.g. create table myTable (UTF8 varchar(10), UCS2 long graphic)![]() ShermanIs this syntax correct? What are the names of the coumns? Can you specify charset in create table statement? When you create a database you can specify a code page, does UDB 8.0 support multiple code pages? I looked at SQL reference and Administrator guide at IBM web site, but could not find information/example there. Can you provide an example to page number in the guide I could look at? Thanks. ![]() "Hemant Shah" <shah (AT) typhoon (DOT) xnet.com> wrote in message news:bhbe2m$qq7$1 (AT) flood (DOT) xnet.com... > While stranded on information super highway Sherman Lau wrote: > In the current v8, DB2 support UTF-8 and UCS-2 in a Unicode database. > Character fields such as char/varchar/long varchar/clob are encoded in UTF-8 > and graphic fields such as graphic/vargraphic/long vargraphic/dbclob are > encoded in UCS-2. The first 127 single-byte characters in UTF-8 is exactly > the same as the ASCII invariant characters in ASCII code pages. These > characters include 0-9, a-z, A-Z, and some symbols !, ", #, $, %, &, ', > (, ), *, +,,, -,.,/,:,;,<,=,>,?,@,[,\,],^,_,`,{,|,},~ and [space]. > ![]() > Sherman![]() > So how would you use different character set for different tables?![]() > ![]() > "Hemant Shah" <shah (AT) typhoon (DOT) xnet.com> wrote in message > news:bh9v09$cgf$1 (AT) flood (DOT) xnet.com... > ![]() > > Folks, > ![]() > > Does DB2 support multiple charsets? > ![]() > > In Oracle you can set NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET > > and declare a column as CHAR or NCHAR. > ![]() > > We are planning to migrate our application to use Unicode and would like > to > > use both ASCII and Unicode character at the same time. > ![]() > ![]() > ![]() > > -- > > Hemant Shah /"\ ASCII ribbon campaign > > E-mail: NoJunkMailshah (AT) xnet (DOT) com \ / --------------------- > > X against HTML mail > > TO REPLY, REMOVE NoJunkMail / \ and postings > > FROM MY E-MAIL ADDRESS. > > -----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------ > > I haven't lost my mind, Above opinions are mine only. > > it's backed up on tape somewhere. Others can have their own. > ![]() > ![]() ![]() > -- > Hemant Shah /"\ ASCII ribbon campaign > E-mail: NoJunkMailshah (AT) xnet (DOT) com \ / --------------------- > X against HTML mail > TO REPLY, REMOVE NoJunkMail / \ and postings > FROM MY E-MAIL ADDRESS. > -----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------ > I haven't lost my mind, Above opinions are mine only. > it's backed up on tape somewhere. Others can have their own.![]() ![]() |
#4
| |||
| |||
|
#5
| |||
| |||
|
| Hemant Shah wrote: While stranded on information super highway Anton Versteeg wrote: The column names are UTF8 and UCS2 respectively. No you cannot specify character sets on the create table statement, other than chosing (var)char for utf8 and (var)graphic for ucs2. You speciy the codepage when you create the database.O.K. I think I am begining to understand. If I declare database code page as UTF-8, then the char, varchar, etc. will use UTF-8 character set, and graphics, vargraphics, etc. will use USC2. Is that correct? Yes Is there a document that will tell me the same thing about other code pages? e.g. If the DB codepage is ISO8859-1 then what character sets are used for char, etc. and graphics, etc. As far as I know this behaviour is only for utf-8 . -- Anton Versteeg IBM Certified DB2 Specialist IBM Netherlands |
![]() |
| Thread Tools | |
| Display Modes | |
| |