SetUTF8Convert Method (CLIENT)


PLB Web Only, 9.7C

 

The SetUTF8Convert method controls the UTF8 byte conversion modes used by the PWS server when communicating with the client browser. The method uses the following format:

 

[label]

{object}.SetUTF8Convert

[GIVING {return}] using [State=]{state}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A CLIENT object.

return

Optional. A Numeric Variable that returns the old conversion state value before the new state is applied.

state

Optional. A Numeric Variable or decimal number that indicates the new UTF8 conversion mode.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. This method affects the data streams that are received and sent for the HTML objects on client browser. This method turns off the PWS automatic UTF8 byte conversion or sets the type of UTF8 byte conversion used when a PLB application is needing to generate or receive custom or specialized data.

  2. The EOS flag is set off.

  3. The ZERO flag is set if the returned value is zero and cleared if the returned value is non-zero.

  4. The OVER flag is set if the {return} numeric variable is to small to receive the returned numeric value.

  5. By the default, the PWS UTF8 byte conversion is turned on which is the same as a state value of one(1). Any {state} values other than those defined below imply value of one (1).

  6. The allowed {state} values are defined as follows:

  7.  

    Value

    Definition

    0

    The PWS server UTF8 byte conversion is turned OFF.

    1

    The PWS server UTF8 byte conversion is turned ON. This is the default state used by the PWS server.

    2

    The PWS server uses the character map table set by the SetUTF16Table method to translate character values 0x80 to 0xFF. Any unknown characters which do not have a translation character become a '?' character. This mode only translates the character values 0x80 to 0xFF.

    400 to 65536

    These {state} values are ONLY used for a Windows PWS server. The PWS server uses the {state} value as a Windows code page to translate the PLB data stream when performing the UTF8 byte conversion. A list of Code Page Identifiers values can be found at the following Microsoft link:

    msdn.microsoft.com/en-us/library/windows/desktop/dd317756%28v=vs.85%29.aspx

 

 

See Also: CLIENT, Client Methods, Method Syntax



PL/B Language Reference SetUTF16Table Method (CLIENT) StorageGet Method (CLIENT)