str_split() will split into bytes, rather than characters when dealing with a multi-byte encoded string.
request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
Warning: When using FormData to submit POST requests using XMLHttpRequest or the Fetch_API with the multipart/form-data Content-Type (e.g. when uploading Files and Blobs to the server), do not explicitly set the Content-Type header on the request. Doing so will prevent the browser from being able to set the Content-Type header with the boundary expression it will use to delimit form fields in the request body.
s.substring(s.length/2 - 1, s.lenght/2 + 1)
$stmt->execute(['dateRecord' => $date]);
echo json_encode($stmt->fetchAll());
[2,5,true,1].sort((a,b) => a-b)
// [true, 1, 2, 5]
$c = "▄";
echo ord(mb_convert_encoding($c, "CP866", "UTF8"));
...
const data = aes_128_decrypt(encryption_key, base64_original);
console.log(data);
}
function aes_128_decrypt(password, data) {
let iv = data.substr(0, 16);
let payload = data.substr(16);
iv = CryptoJS.enc.Hex.parse(iv);
...
return false;
.