Skip to main content

 

Problem

Is it possible to print a Unicode file for a COBOL program when the local language is different to Unicode?

Resolution

Before the file can be printed, it needs to be converted from Unicode (ie UTF-8) to the local code page (in this case CP-864). This conversion is done using the standard Linux/Unix command iconv.

The attached COBOL program performs the following tasks:

  • Call iconv in open to prepare to convert the file
  • Calls iconv to perform the conversion from UTF-8 (Unicode) to CP-864 (Arabic)
  • Call iconv to close and release its resources.

Convert_File.zip

The program has been written as a subprogram so that it can be called prior to the output being sent to the printer. The program uses the following parameters when making the call to iconv:

  1. The UTF8 buffer (input buffer)
  2. The CP864 buffer (output buffer)
  3. The size of the UTF8 buffer
  4. The size of the CP864 buffer

More information about iconv can be found in the standard Linux on-line manual (if it is installed), by using the command:

man iconv

Incident: <?>


#iconv
#unicode
#utf-8

 

Problem

Is it possible to print a Unicode file for a COBOL program when the local language is different to Unicode?

Resolution

Before the file can be printed, it needs to be converted from Unicode (ie UTF-8) to the local code page (in this case CP-864). This conversion is done using the standard Linux/Unix command iconv.

The attached COBOL program performs the following tasks:

  • Call iconv in open to prepare to convert the file
  • Calls iconv to perform the conversion from UTF-8 (Unicode) to CP-864 (Arabic)
  • Call iconv to close and release its resources.

Convert_File.zip

The program has been written as a subprogram so that it can be called prior to the output being sent to the printer. The program uses the following parameters when making the call to iconv:

  1. The UTF8 buffer (input buffer)
  2. The CP864 buffer (output buffer)
  3. The size of the UTF8 buffer
  4. The size of the CP864 buffer

More information about iconv can be found in the standard Linux on-line manual (if it is installed), by using the command:

man iconv

Incident: <?>


#iconv
#unicode
#utf-8

it is important note

Please send me the file "Convert_File.zip"

So thanks


 

Problem

Is it possible to print a Unicode file for a COBOL program when the local language is different to Unicode?

Resolution

Before the file can be printed, it needs to be converted from Unicode (ie UTF-8) to the local code page (in this case CP-864). This conversion is done using the standard Linux/Unix command iconv.

The attached COBOL program performs the following tasks:

  • Call iconv in open to prepare to convert the file
  • Calls iconv to perform the conversion from UTF-8 (Unicode) to CP-864 (Arabic)
  • Call iconv to close and release its resources.

Convert_File.zip

The program has been written as a subprogram so that it can be called prior to the output being sent to the printer. The program uses the following parameters when making the call to iconv:

  1. The UTF8 buffer (input buffer)
  2. The CP864 buffer (output buffer)
  3. The size of the UTF8 buffer
  4. The size of the CP864 buffer

More information about iconv can be found in the standard Linux on-line manual (if it is installed), by using the command:

man iconv

Incident: <?>


#iconv
#unicode
#utf-8

hi,

How to display or print Arabic characters in COBOL program as in GNUcobol 2.2

EX:

      Identification Division.

      Program-ID. disp1.

      Environment Division.

      Data Division.

      Working-Storage Section.

         01 TermFld Pic X.

            88 TermNow Value "T".

      Screen Section.

         01 ScrName

            Background-color 3

            Foreground-color 7

            HIghlight.

            05 Column 10

               Line 3

            Value "Enter 'T' to terminate this test".

            05 Column 10

               Line 5

            Value "أهلا وسهلا في كوبول 2.2".

            05 Column Plus 2

               Background-color 7

               Foreground-color 4

               Pic X

               Using TermFld.

      Procedure Division.

      Mainline.

         Perform until TermNow

           Display ScrName

           Accept ScrName

         End-Perform

      GoBack.

      End Program disp1.

So thanks in advance for help.


 

Problem

Is it possible to print a Unicode file for a COBOL program when the local language is different to Unicode?

Resolution

Before the file can be printed, it needs to be converted from Unicode (ie UTF-8) to the local code page (in this case CP-864). This conversion is done using the standard Linux/Unix command iconv.

The attached COBOL program performs the following tasks:

  • Call iconv in open to prepare to convert the file
  • Calls iconv to perform the conversion from UTF-8 (Unicode) to CP-864 (Arabic)
  • Call iconv to close and release its resources.

Convert_File.zip

The program has been written as a subprogram so that it can be called prior to the output being sent to the printer. The program uses the following parameters when making the call to iconv:

  1. The UTF8 buffer (input buffer)
  2. The CP864 buffer (output buffer)
  3. The size of the UTF8 buffer
  4. The size of the CP864 buffer

More information about iconv can be found in the standard Linux on-line manual (if it is installed), by using the command:

man iconv

Incident: <?>


#iconv
#unicode
#utf-8

Convert_File.zip  can't be downloaded - forbidden access


 

Problem

Is it possible to print a Unicode file for a COBOL program when the local language is different to Unicode?

Resolution

Before the file can be printed, it needs to be converted from Unicode (ie UTF-8) to the local code page (in this case CP-864). This conversion is done using the standard Linux/Unix command iconv.

The attached COBOL program performs the following tasks:

  • Call iconv in open to prepare to convert the file
  • Calls iconv to perform the conversion from UTF-8 (Unicode) to CP-864 (Arabic)
  • Call iconv to close and release its resources.

Convert_File.zip

The program has been written as a subprogram so that it can be called prior to the output being sent to the printer. The program uses the following parameters when making the call to iconv:

  1. The UTF8 buffer (input buffer)
  2. The CP864 buffer (output buffer)
  3. The size of the UTF8 buffer
  4. The size of the CP864 buffer

More information about iconv can be found in the standard Linux on-line manual (if it is installed), by using the command:

man iconv

Incident: <?>


#iconv
#unicode
#utf-8

Help Request.

I need to know How to display and print Arabic characters in COBOL program in GNUcobol 2.2 on Cygwin? As in this sample:

           >>source format free

      identification division.

      program-id. hello.

      environment division.

      data division.

      procedure division.

          display " hello world" line 05 position 15

          end-display.

          display "!! أهلا وسهلا كل العالم" line 07 position 15

          end-display.

     *> goback.

       stop run.