View previous topic :: View next topic
|
Author |
Message |
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Hi All,
I am using the below code to convert my input data in UTF-8 format to EBCDIC.
Code: |
MOVE FUNCTION DISPLAY-OF (FUNCTION NATIONAL-OF
(UTF8-VARIABLE , 1208), 500)
TO EBCDIC-VARIABLE |
It works fine for most of the input UTF-8 Characters. But the above piece of code does not convert X'E2809C' and X'E2809D' which actually should be opening and closing quotes in EBCDIC.
Could you please let me know, what could be the reason?
Is the compiler option correct? Or do I need to change the compiler option? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
In looking at the EBCDIC 500 character set, I do not see either of the characters you're having problems with. Perhaps the problem is that there's nothing to convert them to? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Is the compiler option correct? Or do I need to change the compiler option?
|
it is never the code,
it is always something else.
as robert said, insure that you are using the correct code page in
your line of code
which has nothing to do with the compiler or options |
|
Back to top |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
Good day to all!
Your system doesn't have code pages 1005 & 1156 in the graphic table definitions because 'E2809C' and 'E2809D' are in these code pages. |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Hi..
Could you please let me know what should be the changes to my code?
Also can you please let me know what is the purpose of CODE PAGE. |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Hi..
I have few set of UTF8 characters -
X'E28093' - represents a hyphen
X'E28099' - represents an apostrophe
X'E2809C' - represents opening double inverted commas
X'E2809D' - represents closing double inverted commas
X'E282AC' - represents Euro sign.
Whenever this set of input is given, I get X'3F' in the output,
but I would like it to get converted to a valid set of EBCDIC characters.
Can you please let me know what could be wrong? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
For the meaning of CODE PAGE within a Cobol program, you should find sufficient explanations in the Language Reference and Programming Guide. You'll get it better if you do the reading yourself. If still unclear, explain what you understand, and what you don't. |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Can you please let me know the code changes? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
|