Class DtazvConvert
Collection of static character set and data type conversion utility method.
Inheritance
Inherited Members
Namespace: Subsembly.Dtazv
Assembly: Subsembly.Sepa.dll
Syntax
public static class DtazvConvert
Methods
FromDta(Byte)
Convert a byte from a DTAUS file to its corresponding character.
Declaration
public static char FromDta(byte b)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | b | The DTAUS byte to be converted. |
Returns
Type | Description |
---|---|
System.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.
Declaration
public static string FromDta(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | String with characters in DTAUS0 or DTAUS1 encoding. If |
Returns
Type | Description |
---|---|
System.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.
Declaration
public static bool IsDta(char ch)
Parameters
Type | Name | Description |
---|---|---|
System.Char | ch |
Returns
Type | Description |
---|---|
System.Boolean |
IsDta(String)
Tests whether the given string contains only allowed DTAUS0 characters.
Declaration
public static bool IsDta(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The string to test. If this is |
Returns
Type | Description |
---|---|
System.Boolean |
ToDta(String, Boolean)
Converts a given unicode string into a DTAUS0 encoded string representation.
Declaration
public static string ToDta(string s, bool fWithUmlaut)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | Unicode string to be converted to DTAUS0. If |
System.Boolean | fWithUmlaut | If |
Returns
Type | Description |
---|---|
System.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.