CharsetAttribute Class

MicroFocus.COBOL.RuntimeServices
Character set attribute to allow per-program encodings eg ANSI, UTF8, OEM or ASCII
Restriction:
MicroFocus.COBOL.RuntimeServices are supported for .NET managed code only.
Inheritance Hierarchy

SystemObject
  SystemAttribute
    CharsetAttribute
      MicroFocus.COBOL.RuntimeServicesCharsetAttribute

Namespace:  MicroFocus.COBOL.RuntimeServices
Assembly:  MicroFocus.COBOL.RuntimeServices (in MicroFocus.COBOL.RuntimeServices.dll) Version: 1.2.3.4
Syntax

[AttributeUsageAttribute(AttributeTargets.Class)]
public sealed class CharsetAttribute : CharsetAttribute

The CharsetAttribute type exposes the following members.

Constructors

  NameDescription
Public methodCharsetAttribute
Specifies the character set used by the program, such as ANSI, OEM, UTF8 or ASCII.
Top
Remarks

This attribute ensures that characters are converted correctly when these characters are used in displays, case folding and so on.
Examples

cobol
program-id. Program1 as "Program1".
environment division.
configuration section.
repository.
class cls-MessageBox as "System.Windows.Forms.MessageBox"
class cls-CharacterSet as
    "MicroFocus.COBOL.RuntimeServices.CharsetAttribute"
.

class-attributes.
custom-attribute is cls-CharacterSet("ANSI")
.
 data division.
 procedure division.
 main.
  invoke cls-MessageBox :: "Show" ("This is a Euro-Symbol: €")
See Also

Reference