Share via


Unicode Property

Specifies how the XMLAdapterLoadXML, Attach, AddTableSchema, and ToXML methods and the XMLTableToCursor, ChangesToCursor, and ApplyDiffGram methods handle character strings.

XMLFieldUnicode specifies whether to place a Unicode string into the field.

Note   If XMLFieldIsBinary property is True (.T.), and XMLFieldUnicode is True (.T.), Visual FoxPro generates the appropriate message.

Read/write at design time and run time.

Object.Unicode [= lValue]

Parameters

  • lValue
    Specifies a logical value that determines the how strings are handled depending on the method being executed or are stored.

    The following table describes the values and behaviors of Unicode depending on the method being called or object.

    Method or Object lValue
    XMLAdapter LoadXML and Attach methods True (.T.): Doubles length of a given string and assigns result to the XMLFieldMaxLength property.

    False (.F.): Assigns length of a given string to the XMLFieldMaxLength property.

    When LoadXML and Attach is called, XMLFieldUnicode is set to the value of XMLAdapterUnicode for Character and Memo fields.

    XMLAdapterAddTableSchema method True (.T.): Assigns value of XMLAdapterUnicode (True, or .T.) to XMLFieldUnicode.

    False (.F.): Assigns value of XMLAdapterUnicode (False, or .F.) to XMLFieldUnicode.

    XMLAdapter ToXML method True (.T.): Divides length of a given character field by 2 and assigns the result to xsd:maxLength.

    False (.F.): Assigns length of a given character field to xsd:maxLength.

    When using XMLAdapterToXML, the content of the field is converted from Unicode to the code page of the XML, and the embedded null symbol (CHR(0)+CHR(0)) is considered a string terminator. For Unicode strings stored in Character fields, if the string length is shorter than the field size, the null terminator is required. To terminate the string, use CHR(0)+CHR(0).

    XMLTableToCursor, ChangesToCursor, and ApplyDiffgram methods True (.T.): Creates field with NOCPTRANS flag regardless of XMLFieldNoCpTrans property and stores a Unicode string in the field. For more information, see SET NOCPTRANS Command.
    Note   If the XMLFieldMaxLength property is an odd number, Visual FoxPro generates the appropriate message.

    False (.F.): Creates the field as a regular Character or Memo field.

    XMLField object True (.T.): Stores a Unicode string in the field.

    False (.F.): Stores a non-Unicode string in the field.

See Also

Properties | XMLAdapter Object Properties, Methods, and Events | XMLField Object Properties, Methods, and Events | LoadXML Method | Attach Method | ToCursor Method | ChangesToCursor Method | ApplyDiffGram Method | AddTableSchema Method

Applies To: XMLAdapter Class | XMLField Class