IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Conversion of UTF-8 to EBCDIC


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
muralikrishnan_new

New User


Joined: 02 Jun 2013
Posts: 15
Location: India

PostPosted: Tue Nov 21, 2017 5:33 pm
Reply with quote

Hi,
I am trying to convert the UTF-8 data to EBCDIC data in Cobol. So I have used as mentioned below,

Code:

MOVE FUNCTION NATIONAL-OF(WS-UTF-RCD , 1208 )
                            TO WS-TEMP-RCD 
MOVE FUNCTION DISPLAY-OF(WS-TEMP-RCD, 500 )
                            TO OPT-RCD 


Input :-

Code:

 Grundst.ck   und  Geb.eEN ALS EINEM JAH
 4776677F6627662466E76644244524444424
 725E434C3B05E4075245455E01C3059E5D0A


Output:-

Code:

  Grundst.ck   und  Geb.eEN ALS EINEM JAH
  C9A98AA3894A984C8838CD4CDE4CCDCD4DCC
  7945423F3204540752F55501320595540118


For the Symbol "ü" hex value is X'FC' in UTF-8 and for "ä" hex value is X'E4'.
but all the values after conversion changed as X'3F'.

I tried to use all the Multilingual CCSID for EBCDIC (1140,500,037.,etc).

Could anyone help me which CCSID can be used to convert these characters to EBCDIC.

Thanks
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed Nov 22, 2017 3:29 am
Reply with quote

Talking porkies. U-umlaut and A-umlaut are both encoded using two bytes in UTF8.

Go back and RTFM
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts SMF Record Date conversion failing CLIST & REXX 1
No new posts EBCDIC and ASCII CICS 7
Search our Forums:

Back to Top