How to reproduce
- Import attached SCORM module
- Set a suspend data value using various special characters. E.g. "+"*ç%&/()=? %20 "
- The example uses LMSSetValue to store the value and then uses LMSGetValue to read the value from the server again
- NOK: The value from the server is not the same as the one written
The expected behaviour is that whatever I write, the exact same must be returned.
The problems are:
- The encoding of the connection is not set. Depending on the browser, user, settings, whatever, maybe ISO-8859-1 is used instead of UTF-8. As an effect some characters such as "ç" can not be stored.
- The submitted parameter is not properly encoded. + for example are converted to spaces as in URL this is a reserved keyword. Or %20 is a code for a space. If for some reason someone encoded the parameter using a wrong encoding mechanism, the %20 will be decoded on server side. To make it work the entire value must be encoded.