UniSetDefault

Sets the default Unicode rule table for a virtual machine.

Library:LibC
Service:Characters and Strings

Syntax

  #include <unilib.h> 
   
  int UniSetDefault (
     UniRuleTable_t   table);
  

Parameters

table

(IN) Specifies which table to set as the default Unicode table.

Return Values

If successful, returns 0. Otherwise, returns a negative error code:

Decimal

Name

Description

-496

UNI_ERR_BAD_HANDLE

The table parameter specifies a nonexistent rule table.

Remarks

In support of ANSI/ISO interfaces (from wchar.h), the notion of a default Unicode rule table is supported for each distinct NKS virtual machine (roughly the same boundary as an NLMâ„¢). The default translation table is always the one most appropriate for the host, that is, the table that is used to translate between the local host's code page and Unicode code points.

UniSetDefault can change this, however, by passing a different rule table obtained from UniGetTable or UniGetMacintoshTable. Thereafter, whenever the virtual machine calls a function that uses UNI_LOCAL_DEFAULT as the value for the table parameter, the virtual machine uses this new default instead of the host's value.

NOTE:If used unintelligently, this function can result in considerable confusion for an application and for debugging it.

See Also