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:
- [Solved] it only responds to error and does not enter success after AJAX is successfully processed
- [Solved] JSON.parse() Error: Unexpected end of JSON input
- [Solved] ajax Error: Uncaught SyntaxError: Unexpected end of JSON input
- Interface request error 504 gateway time out [How to Solve]
- [Solved] Font End Image Display Error: net::ERR_CONNECTION_RESET 431 (Request Header Fields Too Large)
- Difference between contenttype and datatype in Ajax request of jquery
- If the request parameter is formdata, use the Ajax operation
- [Solved] Error: Incorrect arguments to mysqld_stmt_execute
- Vue2.0: How to Use vue3 api to encapsulate Axios
- [Solved] node.js Upload Files Error: Multipart: boundary not found multer
- [Solved] Vue Element Date plug-in reports an error in form validation
- [Solved] Pdfjs Preview PDF error: formaterror: bad fcheck in flat stream: 120, 239
- TypeError: r.indexOf is not a function TypeError: r.indexOf is not a function
- Error in created hook: “SyntaxError: Unexpected token u in JSON at position 0
- [Solved] ✖ 2 problem (1 error, 0 warnings) 2 error and 0 warnings potentially fixable with the`–fix`
- [Solved] nodejs express Error: MulterError: Unexpected field
- [Solved] Vue-router Error: Navigation cancelled from “/course“ to “/user“ with a new navigation.
- Solution to build error in Vue project (error in static/JS)/vendor.xxxxx.js from UglifyJs)
- [Solved] Invalid prop: type check failed for prop “modelValue“. Expected Number…
- [Solved] Yapi Secondary deploy error: xxx validation failed: mock: Path `xxx` is required