Important: The information in this document is obsolete and should not be used for new development.
Returns a list of the conversion mappings available on the system that meet specified matching criteria and returns the number of mappings found.
pascal OSStatus QueryUnicodeMappings (
You can use the QueryUnicodeMappings function to obtain all mappings on the system up to the number allowed by your oReturnedMappings array by specifying a value of zero for the iFilter field.
You can use the function to obtain very specific mappings by setting individual filter control flags. You can filter on any of the three text encoding subfields of the Unicode mapping structure's unicodeEncoding specification and on any of the three text encoding subfields of the mapping's otherEncoding specification. The iFilter parameter consists of a set of six control flags that you set to identify which of the corresponding six subfields to include in the match. The list provided in the oReturnedMappings parameter will contain only mappings that match the fields of the Unicode mapping structure whose text encodings subfields you identify in the filter control flags. No filtering is performed on subfields for which you do not set the corresponding filter control flag.
For example, to obtain a list of all mappings in which one of the encodings is the default variant and default format of the Unicode 1.1 base encoding and the other encoding is the default variant and default format of a base encoding other than Unicode, you would set up the iFilter and iFindMappings parameter as follows. To set up these parameters, you use the constants defined for the text encoding bases, the text encoding default variants, the text encoding default formats, and the filter control flag bitmasks. For information on text encoding bases, text encoding default variants, and text encoding default formats and their constants, see the chapter Basic Text Types Reference In this example, the text encoding base field of the Unicode mapping structure's otherEncoding field is ignored, so you can specify any value for it. When you call QueryUnicodeMappings, passing it these parameters, the function will return a list of mappings between the Unicode encoding you specified and every other available encoding in which each non-Unicode base encoding shows up once because you specified its default variant and default format.
iFindMapping.unicodeMapping = CreateTextEncoding(If the function returns a noErr result code, the value retuned in the oActualCount parameter is less than or equal to the value returned in the iMaxCount parameter and the oReturnedMappings parameter contains all of the matching mappings found. If the function returns a kTECArrayFullErr, the function found more mappings than your oReturnedMappings array could accommodate.