Professional Web Applications Themes

Support for multiple char sets? - IBM DB2

Folks, Does DB2 support multiple chts? 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: [email]NoJunkMailshahxnet.com[/email] \ / --------------------- 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 ...

  1. #1

    Default Support for multiple char sets?


    Folks,

    Does DB2 support multiple chts?

    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: [email]NoJunkMailshahxnet.com[/email] \ / ---------------------
    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 Guest

  2. #2

    Default Re: Support for multiple char sets?

    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)

    Sherman

    "Hemant Shah" <shahtyphoon.xnet.com> wrote in message
    news:bhbe2m$qq7$1flood.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" <shahtyphoon.xnet.com> wrote in message
    > :)news:bh9v09$cgf$1flood.xnet.com...
    > :)>
    > :)> Folks,
    > :)>
    > :)> Does DB2 support multiple chts?
    > :)>
    > :)> 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: [email]NoJunkMailshahxnet.com[/email] \ / ---------------------
    > :)> 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: [email]NoJunkMailshahxnet.com[/email] \ / ---------------------
    > 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.

    Sherman Lau Guest

  3. #3

    Default Re: Support for multiple char sets?

    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.

    Hemant Shah wrote:
    >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)
    >:)
    >:)Sherman
    >
    > Is this syntax correct?
    > What are the names of the coumns?
    > Can you specify cht 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" <shahtyphoon.xnet.com> wrote in message
    >:)news:bhbe2m$qq7$1flood.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" <shahtyphoon.xnet.com> wrote in message
    >:)> :)news:bh9v09$cgf$1flood.xnet.com...
    >:)> :)>
    >:)> :)> Folks,
    >:)> :)>
    >:)> :)> Does DB2 support multiple chts?
    >:)> :)>
    >:)> :)> 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: [email]NoJunkMailshahxnet.com[/email] \ / ---------------------
    >:)> :)> 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: [email]NoJunkMailshahxnet.com[/email] \ / ---------------------
    >:)> 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.
    >:)
    >:)
    >
    >
    >
    --
    Anton Versteeg
    IBM Certified DB2 Specialist
    IBM Netherlands


    Anton Versteeg Guest

  4. #4

    Default Re: Support for multiple char sets?

    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?

    Is there a doent 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.


    :)
    :)Hemant Shah wrote:
    :)
    :)>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)
    :)>:)
    :)>:)Sherman
    :)>
    :)> Is this syntax correct?
    :)> What are the names of the coumns?
    :)> Can you specify cht 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" <shahtyphoon.xnet.com> wrote in message
    :)>:)news:bhbe2m$qq7$1flood.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" <shahtyphoon.xnet.com> wrote in message
    :)>:)> :)news:bh9v09$cgf$1flood.xnet.com...
    :)>:)> :)>
    :)>:)> :)> Folks,
    :)>:)> :)>
    :)>:)> :)> Does DB2 support multiple chts?
    :)>:)> :)>
    :)>:)> :)> 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: [email]NoJunkMailshahxnet.com[/email] \ / ---------------------
    :)>:)> :)> 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: [email]NoJunkMailshahxnet.com[/email] \ / ---------------------
    :)>:)> 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.
    :)>:)
    :)>:)
    :)>
    :)>
    :)>
    :)
    :)--
    :)Anton Versteeg
    :)IBM Certified DB2 Specialist
    :)IBM Netherlands
    :)
    :)

    --
    Hemant Shah /"\ ASCII ribbon campaign
    E-mail: [email]NoJunkMailshahxnet.com[/email] \ / ---------------------
    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 Guest

  5. #5

    Default Re: Support for multiple char sets?

    The GRAPHIC datatypes may be new in the non-Asia Pacific market. Indeed, we
    support Unicode GRAPHIC column in EUC database in DB2 v2, 8 years ago. In a
    EUC Japanese/Tradional Chinese database, the CHAR columns are encoded in EUC
    and the GRAPHIC columns are encoded in Unicode UCS-2.

    Other than UTF-8 and EUC databases, the codeset of the CHAR and GRAPHIC
    columns are almost the same.

    GRAPHIC column is not support in SBCS databases such as ISO-8859-1.

    Sherman
    "Anton Versteeg" <anton_versteegnnll.iibbmm.com> wrote in message
    news:3F40A182.5070505nnll.iibbmm.com...
    >
    >
    > 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 doent 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
    >
    >

    Sherman Lau Guest

  6. #6

    Default Re: Support for multiple char sets?

    I have a requirement wherein we will be getting international characters(almost all available char sets) in a mainframe file and we need to upload them in DB2 table.

    Does mainframe flat file supports all international char's and what would be the data type in DB2 which supports all international char's .


    Dinesh
    Unregistered Guest

Similar Threads

  1. Question Support for multiple char sets?
    By daggar3 in forum Brainstorming Area
    Replies: 0
    Last Post: September 14th, 08:21 AM
  2. DataAdapter and multiple result sets
    By Michael C# in forum ASP.NET Web Services
    Replies: 2
    Last Post: May 10th, 06:05 PM
  3. Replies: 0
    Last Post: September 11th, 04:35 PM
  4. Replies: 0
    Last Post: August 20th, 01:37 AM
  5. Moving multiple layer sets at the same time
    By Richard Crane in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 1
    Last Post: August 7th, 04:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139