Skip to content

Windows Inventory don't return correctly non-ascii characters #17

Description

@ncharles

If there are Windows softwares with non-ascii characters, they show up as ??? ???? in the inventory

To reproduce, you may create dummy entries with cyrilic characters

$baseReg = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
$softwares = @(
     @{ Path = "${baseReg}\{90150000-001F-0403-1000-0000000FF1CE}"; Name = "Microsoft Office Proofing Tools 2013 – български"; Version = "15.0.4569.1506"}
)
for ($i=0; $i -lt $softwares.length; $i++) {
  $current = $softwares[$i]
  write-output "Adding dummy software $($current.Name)"
  New-Item -Path $current.Path -Force
  New-ItemProperty -Path $current.Path -Name "DisplayName" -Value $current.Name -Type "String"
  New-ItemProperty -Path $current.Path -Name "DisplayVersion" -Value $current.Version -Type "String"
}

esulting inventory will return
<NAME>Microsoft Office Proofing Tools 2013 <C3><82><C2><96> ?????????</NAME>

I've tried to

  • force codepage to 65001 in fusioninventory.bat
  • remove encoding in encodeFromRegistry in file Agent/Tool/Win32.pm
  • change the perl version
  • agent version 2.4 and 2.6
  • add use feature 'unicode_strings'; all around the code

And i'm a bit stuck there... do you know what I could do ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    c:agent-rust (>=3.0)Related to agent writen in Rust, so since version 3.0

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions