Skip to main content
Skip table of contents

Character String Encoding

When LightWave Client copies "string" fields between the JSON message elements and the application IPM it assumes that the data is stored in the IPM using the default encoding which is ISO-8859-1 encoding. The encoding used can be altered on the element, the API, or set at CLIENT process startup.

  • To set the encoding for an individual element, set the encoding attribute on the element.
  • To set the default encoding on all string elements used by an API method, set the encoding on the method in the API editor.
  • To set the default encoding for all services on a specific CLIENT instance set the --default-encoding startup option to the desired encoding.

 For example, a request or response containing the following schema structure:

JS
"Request": {
  "elements": [
    {
      "name": "string_SHIFT_JIS",
      "type": "string"
      "size": 32,
	  "encoding": "SHIFT_JIS"
    }
  ]
}

Would be serialized or deserialized using the SHIFT_JIS encoding, producing the following JSON and IPM data:

JS
{
  "string_SHIFT_JIS": "ぐけげこごさざしじすずせぜそぞた"
}


TEXT
0x00000000: 82ae 82af 82b0 82b1 82b2 82b3 82b4 82b5  00000000: ................
0x00000010: 82b6 82b7 82b8 82b9 82ba 82bb 82bc 82bd  00000016: ................


The value of the encoding attribute or the --default-encoding startup option can be any one of the Character Encoding Names values. Note that LightWave Client always uses UTF-8 encoding for the message payload. Refer to Character Encoding Names for a complete list of the available character encoding names.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.