DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Property: CharacterFormat for Formatter

Property: CharacterFormat for Formatter

Specifies the coding for interpreting the strings in the file.

Object.CharacterFormat
ObjectFormatter
Object with this property
Object.CharacterFormatEnumeration with read and write access and the following selection terms:
 0
eUTF16 
16-bit characters that allow Asian characters, for example.
 1
eANSI 
Extended ASCII character set (8-bit).
 3
eSJIS 
Shift-JIS character set for the Japanese language.
 4
eUTF8 
8-bit character set commonly used for encoding English texts.
Note  If you do not specify the coding, it is specified automatically. The first two bytes in the file are checked. If the first two bytes contain 0xFEFF, this indicates UTF16 coding.

The following example reads a text channel. The text is UTF16-coded:

File.Formatter.TrimCharacters = " "
File.Formatter.LineFeeds = vbNewLine
File.Formatter.Delimiters = ";"
File.Formatter.CharacterFormat = eUTF16
Dim oBlock: Set oBlock = File.GetStringBlock()
Dim oChn  : Set oChn = oBlock.Channels.Add("Texts", eString)
Dim oMyGrp: Set oMyGrp = Root.ChannelGroups.Add("MyChannelGroup")
Call oMyGrp.Channels.AddDirectAccessChannel(Channel)
In This Section
Was this information helpful?