IMPORTANT: The default font used to update appearance streams is StandardFonts.Helvetica. Note that this is a WinAnsi font. This means that encoding errors will be thrown if this field contains any options with characters outside the WinAnsi character set (the latin alphabet).
Embedding a custom font and passing it to PDFForm.updateFieldAppearances or PDFOptionList.updateAppearances allows you to generate appearance streams with characters outside the latin alphabet (assuming the custom font supports them).
$lines = explode("\r\n", $yourAwfulString);
$json = $lines[count($lines) - 2);
$result = json_decode($json);
MySQL как вставить запись если не существует в таблице?