Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug2 logging gives "Wide character in print at [...]\FusionInventory-Agent/perl/agent/FusionInventory/Agent/Logger/File.pm line 58." #1055

Open
sf0-k46 opened this issue Nov 12, 2024 · 0 comments

Comments

@sf0-k46
Copy link

sf0-k46 commented Nov 12, 2024

Activating debug2 logging of FusionInventory Agent 2.6 on Windows ...

Set-ItemProperty -Path 'HKLM:\SOFTWARE\FusionInventory-Agent' -Name debug -Value 2

... and running inventory ...

${TARGETDIR}\fusioninventory-agent.bat

... returns ...

Wide character in print at [...]\FusionInventory-Agent/perl/agent/FusionInventory/Agent/Logger/File.pm line 58.

.
... and returning an error code.

This is probably due to the debug2 logging containing the UTF-8 encoded XML inventory in HTTP traffic containing wide characters:

[Tue Nov 12 12:20:54 2024][debug2] [http client] sending message:
 <?xml version="1.0" encoding="UTF-8" ?>
[...]
<NAME>Intel® Software Installer</NAME>

Maybe the corresponding open statement has to be modified? E.g. from ...

if (!open $handle, '>', $self->{logfile}) {

... to ...

if (!open $handle, '>:encoding(utf-8)', $self->{logfile}) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant