Unicode Property

Specifies how the XMLAdapter LoadXML, Attach, AddTableSchema, and ToXML methods and the XMLTable ToCursor, ChangesToCursor, and ApplyDiffGram methods handle character strings.

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

Note

If XMLField IsBinary property is True (.T.), and XMLField Unicode 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 XMLField MaxLength property.

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

    When LoadXML and Attach is called, XMLField Unicode is set to the value of XMLAdapter Unicode for Character and Memo fields.

    XMLAdapter AddTableSchema method

    True (.T.): Assigns value of XMLAdapter Unicode (True, or .T.) to XMLField Unicode.

    False (.F.): Assigns value of XMLAdapter Unicode (False, or .F.) to XMLField Unicode.

    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 XMLAdapter ToXML, 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).

    XMLTable ToCursor, ChangesToCursor, and ApplyDiffgram methods

    True (.T.): Creates field with NOCPTRANS flag regardless of XMLField NoCpTrans property and stores a Unicode string in the field. For more information, see SET NOCPTRANS Command.

    Note

    If the XMLField MaxLength 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.

Remarks

Applies To: XMLAdapter Class | XMLField Class

See Also

Reference

XMLAdapter Object Properties, Methods, and Events
XMLField Object Properties, Methods, and Events
LoadXML Method
Attach Method (Visual FoxPro)
ToCursor Method
ChangesToCursor Method
ApplyDiffgram Method
AddTableSchema Method

Other Resources

Properties (Visual FoxPro)