IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 1230
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 All times are GMT + 6 Hours
Forum Index -> COBOL Programming
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts XYplorer - EBCDIC to ASCII translatio... All Other Mainframe Topics 0
No new posts Date format conversion DFSORT/ICETOOL 4
No new posts EBCDIC to ASCII conversion help All Other Mainframe Topics 1
No new posts EBCDIC (0037) to/from UTF-8 (1208) CLIST & REXX 2
No new posts Bad arithmetic conversion when assign... CLIST & REXX 4

Back to Top