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
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1252
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 Help this REXX Rookie-Bad arithmetic ... CLIST & REXX 7
No new posts Date conversion using SORT SYNCSORT 4
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
No new posts Date Conversion Y2T to Y2W SYNCSORT 8
No new posts XYplorer - EBCDIC to ASCII translatio... All Other Mainframe Topics 0
Search our Forums:

Back to Top