class %SYS.NLS.Device
extends %RegisteredObject
Exposes some NLS properties of the current device.
Changing a property acts immediately on the current device,
not on the device that was current when the object was
instantiated.
For generic locale properties see %SYS.NLS.Locale.
For system and process NLS table settings see %SYS.NLS.Table.
For date, time and number format properties see %SYS.NLS.Format.
property InpDefaultAction
as %Integer;
Input default action
- 0 = generate error
- 1 = replace with replacement value/string
- 2 = ignore (replace with original character)
property InpReplaced
as %Boolean;
If true indicates that a replacement occurred during
the last input translation.
property InpReplacementValue
as %String;
Input replacement value/string.
Substituted in case of error if InpDefaultAction=1
property OutDefaultAction
as %Integer;
Output default action
- 0 = generate error
- 1 = replace with replacement value/string
- 2 = ignore (replace with original character)
property OutReplaced
as %Boolean;
If true indicates that a replacement occurred during
the last output translation.
property OutReplacementValue
as %String;
Output replacement value/string.
Substituted in case of error if OutDefaultAction=1
property Pitch
as %Integer;
Used with double width characters (e.g. Kanji)
property State
as %Boolean;
State of translation for current device
property XLTTable
as %String;
Translation table associated with current device.
method InpModeStrGetAt(mode As %Integer)
as %String
Get input mode string
Parameters:
Returns: current input string for given mode or "" in case of error
method InpModeStrSetAt(value As %String, mode As %Integer)
as %String
Set input mode string
Parameters:
- value - new input mode string
- mode - mode number
Returns: previous input string for given mode or "" in case of error
method OutModeStrGetAt(mode As %Integer)
as %String
Get output mode string
Parameters:
Returns: current output string for given mode or "" in case of error
method OutModeStrSetAt(value As %String, mode As %Integer)
as %String
Set output mode string
Parameters:
- value - new output mode string
- mode - mode number
Returns: previous output string for given mode or "" in case of error
classmethod SetIO(tabnam As %String)
as %String
Sets I/O translation table for current device
This method exists as a convenience only. Calling
it is equivalent to instanciating a %SYS.NLSDevice
object and setting obj.XLTTable=tabnam
Parameters:
Returns: previous table or "" in case of error