mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-29 17:56:43 +01:00
Reading strings as UTF-8
Solves issue GH-1
This commit is contained in:
parent
74e49dca20
commit
56c14351d6
@ -347,7 +347,7 @@ class Sws extends SwsModel
|
||||
}
|
||||
// PlayerNames
|
||||
$length = (Integer)$sws->getBinaryData("NewNamePos") + 0;
|
||||
$sws->setBinaryData("PlayerNames", self::ReadData('String', substr($swscontents, $offset, $length)));
|
||||
$sws->setBinaryData("PlayerNames", substr($swscontents, $offset, $length));
|
||||
$offset += $length;
|
||||
|
||||
for ($i = 0; $i < $sws->getBinaryData("NewPlayer"); $i++) {
|
||||
@ -524,7 +524,7 @@ class Sws extends SwsModel
|
||||
if ($data == '') {
|
||||
return (is_null($default)) ? '' : $default;
|
||||
}
|
||||
return $data;
|
||||
return iconv('windows-1252', 'utf-8', $data);
|
||||
break;
|
||||
case 'Hex':
|
||||
case 'Int':
|
||||
|
Loading…
Reference in New Issue
Block a user