Class DtazvConvert

Namespace
Subsembly.Dtazv
Assembly
Subsembly.Sepa.dll

Collection of static character set and data type conversion utility method.

public static class DtazvConvert
Inheritance
DtazvConvert
Inherited Members

Methods

FromDta(byte)

Convert a byte from a DTAUS file to its corresponding character.

public static char FromDta(byte b)

Parameters

b byte

The DTAUS byte to be converted.

Returns

char

The Unicode character.

Remarks

Basically this method does nothing but convert the DTAUS0 or DTAUS1 encoded german umlaut characters to Unicode representations. All other bytes are returned as is.

FromDta(string)

Converts a given DTAUS encoded string into a Unicode string representation.

public static string FromDta(string s)

Parameters

s string

String with characters in DTAUS0 or DTAUS1 encoding. If null, then null will be returned.

Returns

string

Unicode string.

Remarks

Basically this method does nothing but convert the DTAUS0 or DTAUS1 encoded german umlaut characters to Unicode representations. All other characters are copied as is.

IsDta(char)

Tests whether the given character is an allowed DTAUS0 character.

public static bool IsDta(char ch)

Parameters

ch char

Returns

bool

IsDta(string)

Tests whether the given string contains only allowed DTAUS0 characters.

public static bool IsDta(string s)

Parameters

s string

The string to test. If this is null, then true is returned.

Returns

bool

ToDta(string, bool)

Converts a given unicode string into a DTAUS0 encoded string representation.

public static string ToDta(string s, bool fWithUmlaut)

Parameters

s string

Unicode string to be converted to DTAUS0. If null, then null will be returned.

fWithUmlaut bool

If true, then the german Umlaut characters are converted just as described. If false, then the german Umlaut characters are converted as 'A', 'O', 'U', and 'S' respectively.

Returns

string

DTAUS encoded string.

Remarks

The conversion will convert all lower case characters into upper case characters. All nonprinting character codes are converted to space characters. All foreign umlaut characters are converted into their non-umlaut base characters. The german umlaut characters 'AE', 'OE', 'UE', and 'sz' are converted to their DTAUS0 replacements '[', '', ']', and '~'. Any other symbol characters, or characters beyond '\xFF' are converted to single '.' characters.