Visit Gigasoft's Web Site
 ProEssentials v9 Help

CharSet

Scope

Pego, Pesgo, Pe3do, Pepso, Pepco

Type

Int32

Default

0

.NET

PeString.CharSet

Ocx|Vcl

CharSet

DLL

PEP_nCHARSET

 

Purpose

ProEssentials v5 and earlier were MBCS and this property was needed to handle multibyte character sets.

 

ProEssentials v6 and later is Unicode, however, this property is still needed in certain scenarios which are not inherently Unicode. RenderEngine defaults to PERE_HYBRID, however, RenderEngine set to PERE_GDI (0) represents pure Metafile compatibility. Metafiles can not support Unicode. If working with a character set that is not a single byte character set (or contains special characters) you should set CharSet and CodePage appropriately. Then also set WideCharToMultiByte = True which enables an internal WideCharToMultiByte conversion of Unicode strings when necessary. If never setting RenderEngine = PERE_GDI, you still need to set the above properties if you want to support exporting Metafile images containing multibyte strings. Exported metafiles are built as if RenderEngine is set to PERE_GDI.

 

This property controls the fdwCharSet argument in all Windows CreateFont API calls invoked by ProEssentials. This allows you to change the character set used for text within ProEssentials controls and images.

 

The following constants apply to this property. For more info, see Microsoft's documentation for the CreateFont Api call.

  • ANSI_CHARSET 0

  • SYMBOL_CHARSET 2

  • SHIFTJIS_CHARSET 128

  • HANGEUL_CHARSET 129

  • JOHAB_CHARSET 130
  • GB2312_CHARSET 134

  • CHINESEBIG5_CHARSET 136

  • GREEK_CHARSET 161

  • TURKISH_CHARSET 162

  • VIETNAMESE_CHARSET 163
  • HEBREW_CHARSET 177

  • ARABIC_CHARSET 178

  • BALTIC_CHARSET 186

  • RUSSIAN_CHARSET 204

  • THAI_CHARSET 222

  • EASTEUROPE_CHARSET 238

  • OEM_CHARSET 255

Comments

For example, if your application is using Chinese characters, you would set CodePage = 950, CharSet = 136, and WideCharToMultiByte = True.

 

PeString.CharSet members of Pego.PeString, Pesgo.PeString, Pe3do.PeString, Pepso.PeString, Pepco.PeString

 

See Also: CodePage, WideCharToMultiByte, RenderEngine