how to js Filter utf8 non-3-byte encoded string
how to js Filter utf8 non-3-byte encoded string
                Byte 1    Byte 2    Byte 3    Byte 4    Byte 5    Byte 6
  7    U+0000    U+007F    1    0xxxxxxx
11    U+0080    U+07FF    2    110xxxxx    10xxxxxx
16    U+0800    U+FFFF    3    1110xxxx    10xxxxxx    10xxxxxx
21    U+10000    U+1FFFFF    4    11110xxx    10xxxxxx    10xxxxxx    10xxxxxx
26    U+200000    U+3FFFFFF    5    111110xx    10xxxxxx    10xxxxxx    10xxxxxx    10xxxxxx
31    U+4000000    U+7FFFFFFF    6    1111110x    10xxxxxx    10xxxxxx    10xxxxxx    10xxxxxx    10xxxxxx
is either 3 bytes or
other than 0x0800-0xffff.const str = '1\a';
const reg = /[^\u0800-\uffff]/g;
str.replace(reg,'');
Previous: When echarts draws a map, how does the trigger condition change?
Next: I'd like to ask you a question about the deployment of nginx.
I know one. Use web-audio-api to decode the arrayBuffer data transmitted from the background, and then play the sound. Are there any other ideas? ...
write a custom verification rule in the validator of tp5, and verify that the utf8 encoded character length of the input field is within 31 coding is not very good at conversion. In the previous paragraph, I did the page verification of js. The code i...