Add UTF-8 / multi-byte charset support to ADIF parser

This commit is contained in:
Mikael Nousiainen
2021-01-15 00:52:50 +02:00
parent 31e2107c98
commit 731438c28d
2 changed files with 38 additions and 40 deletions

View File

@@ -129,7 +129,7 @@ class AdifHelper {
function getAdifFieldLine($adifcolumn, $dbvalue) {
if ($dbvalue != "") {
return "<" . $adifcolumn . ":" . strlen($dbvalue) . ">" . $dbvalue;
return "<" . $adifcolumn . ":" . mb_strlen($dbvalue, "UTF-8") . ">" . $dbvalue;
} else {
return "";
}