A hex string is still a character string, so it has an encoding. You can
   use the BX prefix for binary hex strings: BX'01020304'. You can see what
   the CCSID it will be assigned here:
   [1]
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/db2/rbafzcharconst.htm
    
     ----- Original message -----
     From: Steve Richter <stephenrichter@xxxxxxxxx>
     Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>
     To: Midrange Systems Technical Discussion
     <midrange-l@xxxxxxxxxxxxxxxxxx>
     Cc:
     Subject: Re: how to insert hex data into UTF-8 column?
     Date: Sun, Mar 10, 2019 5:02 PM
      
     this post has a lot of good info.
     [2]
https://www.ibm.com/developerworks/community/forums/html/topic?id=4fddf9b9-b8d3-4ba3-9824-476d6a2efa48
     do not follow why DB2 would want to translate hex data.   The point of
     hex
     is to bypass any character translation.
     On Sun, Mar 10, 2019 at 1:29 PM Steve Richter <stephenrichter@xxxxxxxxx>
     wrote:
     >
     >
     > On Sun, Mar 10, 2019 at 12:43 PM Jon Paris <jon.paris@xxxxxxxxxxxxxx>
     > wrote:
     > >
     > > I'm guessing that by default it is expecting the hex values to be
     > EBCDIC.  This works:
     > >
     > > insert into  repcat52 ( catnum, catname, desc, desc_utf)
     > > values( 1, 'WAVE', x'818283F1F2F3',
     > > x'F1F2F3');
     > >
     >
     > I am looking to insert some multibyte UTF-8 characters.  like x'C383'.
     >
     > [3]
https://www.fileformat.info/info/charset/UTF-8/encode.htm
     >
     >
     >
     >
     >
     >
     >
     --
     This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
     list
     To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
     To subscribe, unsubscribe, or change list options,
     visit: [4]
https://lists.midrange.com/mailman/listinfo/midrange-l
     or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
     Before posting, please take a moment to review the archives
     at [5]
https://archive.midrange.com/midrange-l.
     Please contact support@xxxxxxxxxxxx for any subscription related
     questions.
     Help support midrange.com by shopping at amazon.com with our affiliate
     link: [6]
https://amazon.midrange.com
      
    
References
   Visible links
   1. 
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/db2/rbafzcharconst.htm
   2. 
https://www.ibm.com/developerworks/community/forums/html/topic?id=4fddf9b9-b8d3-4ba3-9824-476d6a2efa48
   3. 
https://www.fileformat.info/info/charset/UTF-8/encode.htm
   4. 
https://lists.midrange.com/mailman/listinfo/midrange-l
   5. 
https://archive.midrange.com/midrange-l
   6. 
https://amazon.midrange.com/
As an Amazon Associate we earn from qualifying purchases.