Skip to content

Commit

Permalink
Update Windows.php
Browse files Browse the repository at this point in the history
  • Loading branch information
twilroad authored Nov 22, 2017
1 parent c25bef7 commit 899c8e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Linfo/OS/Windows.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getContains()
public function getOS()
{
foreach ($this->wmi->ExecQuery('SELECT Caption FROM Win32_OperatingSystem') as $os) {
return $os->Caption;
return iconv("GB2312", "UTF-8", $os->Caption);
}

return 'Windows';
Expand Down Expand Up @@ -412,8 +412,8 @@ public function getDevs()
$manufacturer = $pnpdev->Manufacturer;
$caption = $pnpdev->Caption;
if (function_exists('iconv')) {
$manufacturer = iconv('Windows-1252', 'UTF-8//TRANSLIT', $manufacturer);
$caption = iconv('Windows-1252', 'UTF-8//TRANSLIT', $caption);
$manufacturer = iconv('GB2312', 'UTF-8', $manufacturer);
$caption = iconv('GB2312', 'UTF-8', $caption);
}
$devs[] = array(
'vendor' => $manufacturer,
Expand Down

0 comments on commit 899c8e3

Please sign in to comment.