When the front-end page sends a request to the background, non-english is put into the request header, so there will be coding format problems
Error message:
Failed to execute ‘setRequestHeader’ on ‘XMLHttpRequest’: String contains non ISO-8859-1 code point.
Solution:
Encoding: encodeURIComponent(str)
decoding: decodeURIComponent(str)
Read More:
- TypeScript error TS2345: Argument of type ‘String ‘is not assignable to parameter of type ‘string’
- [Solved] Failed to execute ‘getRangeAt‘ on ‘Selection‘: 0 is not a valid index.“
- request.js?b775:101 Uncaught (in promise) Error: Failed to convert value of type ‘java.lang.String’ to required type ‘java.lang.Long’;
- [Solved] Uncaught DOMException: Failed to execute ‘readAsDataURL‘ on ‘FileReader‘: The object is already busy
- [Solved] Error: Incorrect arguments to mysqld_stmt_execute
- JS to find the last character of the string and remove it
- [Vue warn]: Invalid prop: type check failed for prop “index“. Expected String, got Undefined
- The solution that needs alert to execute after using ajax
- Using ts-node to Execute .ts files Error [Solved]
- JS to determine whether the string contains a character
- [Solved] Invalid prop: type check failed for prop “index“. Expected String, got Undefined
- Error:Request failed with status code 401 [How to Solve]
- [Solved] bug: error Command failed with exit code 1.
- [Vue warn]: Error in callback for watcher “fileList”: “TypeError: Cannot create property ‘uid’ on string
- node.js yarn Error: SyntaxError: Unexpected string [How to Solve]
- [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string. Received undefined error
- [Solved] Vue3 npm ERR code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- How to Solve QT uses MSVC compiler to code error
- SVN Update Error: Please execute the ‘Cleanup‘ command.