[Fusioninventory-commit] [fusinv/fusioninventory-agent] 31a163: unicode fix around Win32::OLE

Gonéri Le Bouder goneri at rulezlan.org
Tue May 22 12:42:12 UTC 2012


  Branch: refs/heads/2.2.x-without-charset-changes
  Home:   https://github.com/fusinv/fusioninventory-agent
  Commit: 31a16363cb25ed23cc189e744b73c282e9b5d4c6
      https://github.com/fusinv/fusioninventory-agent/commit/31a16363cb25ed23cc189e744b73c282e9b5d4c6
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-05-17 (Thu, 17 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent/Tools/Win32.pm

  Log Message:
  -----------
  unicode fix around Win32::OLE

We configured Win32::OLE to use UTF8 with the CP => CP_UTF8 parameter.
The string are stored as Perl internal string but without the utf8 flag.

Since we know it's UTF8, we call utf8::upgrade to add the internal UTF8
flag on them.

Win32::OLE may returns non "string" item like array so we need to be
cleaver a bit.

This changes also add a fix for the case Win32::TieRegistry returns string with the UTF8 flag. In this case we won't reencode them.


  Commit: c7fee92d7f4da46a282ef3d39e15ae53a9d046f6
      https://github.com/fusinv/fusioninventory-agent/commit/c7fee92d7f4da46a282ef3d39e15ae53a9d046f6
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-05-17 (Thu, 17 May 2012)

  Changed paths:
    M etc/agent.cfg
    M lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Screen.pm
    M lib/FusionInventory/Agent/Task/Inventory/Input/Linux/Archs/i386.pm
    M lib/FusionInventory/Agent/Task/Inventory/Input/MacOS/CPU.pm
    M lib/FusionInventory/Agent/Task/Inventory/Input/Win32/CPU.pm
    M lib/FusionInventory/Agent/Task/Inventory/Input/Win32/Softwares.pm
    M lib/FusionInventory/Agent/Task/Inventory/Inventory.pm
    M lib/FusionInventory/Agent/Tools/Generic.pm
    A resources/macos/sysctl/10.6-macmini
    A resources/macos/system_profiler/10.6-macmini
    A resources/win32/wmi/xp-Win32_QuickFixEngineering.wmi
    M t/inventory/linux/cpu.t
    A t/inventory/macos/cpu.t
    M t/inventory/macos/memory.t
    M t/inventory/windows/cpu.t
    M t/inventory/windows/softwares.t
    M t/tools/generic.t

  Log Message:
  -----------
  Merge remote branch 'origin/2.2.x' into 2.2.x


  Commit: f95fa0de8efe17db2d8e50c42a4a3ebc54698a18
      https://github.com/fusinv/fusioninventory-agent/commit/f95fa0de8efe17db2d8e50c42a4a3ebc54698a18
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-05-17 (Thu, 17 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent/Task/Inventory/Input/Win32/User.pm

  Log Message:
  -----------
  get UTF8 from Win32::OLE

much like commit:31a16363cb25ed23cc189e744b73c282e9b5d4c6


  Commit: f791c0eb973ebb4e8f2658d069116cce07bd9553
      https://github.com/fusinv/fusioninventory-agent/commit/f791c0eb973ebb4e8f2658d069116cce07bd9553
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-05-17 (Thu, 17 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent/Tools.pm

  Log Message:
  -----------
  protect XML entities

use HTML::Entities to protect the content of the XML.

closes: #1566

This changes also fix the "Wide character" errors with Compress::Zip
by avoid the failure of utf8::downgrade().
All the character are avalaible in the current code page.

Reported-by: James M Pulver <jmp242 at cornell.edu>


  Commit: 3af10068744247d81e8dc65908aecc93775d27e1
      https://github.com/fusinv/fusioninventory-agent/commit/3af10068744247d81e8dc65908aecc93775d27e1
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-05-17 (Thu, 17 May 2012)

  Changed paths:
    M Changes

  Log Message:
  -----------
  refresh the change log


  Commit: 41d8102d7114654db9ecd957ee3da7e03dff8485
      https://github.com/fusinv/fusioninventory-agent/commit/41d8102d7114654db9ecd957ee3da7e03dff8485
  Author: Guillaume Rousse <guillomovitch at gmail.com>
  Date:   2012-05-20 (Sun, 20 May 2012)

  Changed paths:
    M t/inventory/windows/softwares.t

  Log Message:
  -----------
  cosmetics


  Commit: 15c85e185709d9aa88ced274f42983e33297ac39
      https://github.com/fusinv/fusioninventory-agent/commit/15c85e185709d9aa88ced274f42983e33297ac39
  Author: Guillaume Rousse <guillomovitch at gmail.com>
  Date:   2012-05-20 (Sun, 20 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent/Tools.pm

  Log Message:
  -----------
  Revert "protect XML entities"

This reverts commit f791c0eb973ebb4e8f2658d069116cce07bd9553.

XML::TreePP already handles prohibited characters automatically,
explicitely doing it beforehand just triggers double conversion into
characters entities.

See #1566 for details, and t/xml/query/inventory.t for related test.


  Commit: be71362b730c26b2d0ccdcc965baddcebf770466
      https://github.com/fusinv/fusioninventory-agent/commit/be71362b730c26b2d0ccdcc965baddcebf770466
  Author: Guillaume Rousse <guillomovitch at gmail.com>
  Date:   2012-05-20 (Sun, 20 May 2012)

  Changed paths:
    M t/xml/query/inventory.t

  Log Message:
  -----------
  additional content test

This allow to test for double character entities issues, using
an actual underlying inventory object.


  Commit: f6bea2af2b9f452dc90f14e8d4017a6b078cf092
      https://github.com/fusinv/fusioninventory-agent/commit/f6bea2af2b9f452dc90f14e8d4017a6b078cf092
  Author: Guillaume Rousse <guillomovitch at gmail.com>
  Date:   2012-05-20 (Sun, 20 May 2012)

  Changed paths:
    M Changes

  Log Message:
  -----------
  issue not fixed yet


  Commit: c9a86429e854fbde9731c093f6a80cddb49754a2
      https://github.com/fusinv/fusioninventory-agent/commit/c9a86429e854fbde9731c093f6a80cddb49754a2
  Author: Guillaume Rousse <guillomovitch at gmail.com>
  Date:   2012-05-20 (Sun, 20 May 2012)

  Changed paths:
    M Changes

  Log Message:
  -----------
  update changes list


  Commit: 26e7de6106797a2311573e1de491e48376d72638
      https://github.com/fusinv/fusioninventory-agent/commit/26e7de6106797a2311573e1de491e48376d72638
  Author: Guillaume Rousse <guillomovitch at gmail.com>
  Date:   2012-05-20 (Sun, 20 May 2012)

  Changed paths:
    M Changes

  Log Message:
  -----------
  do not list distribution changes in agent changelog


  Commit: 999b231562925768e12586832e73899cede6bee5
      https://github.com/fusinv/fusioninventory-agent/commit/999b231562925768e12586832e73899cede6bee5
  Author: Guillaume Rousse <guillomovitch at gmail.com>
  Date:   2012-05-20 (Sun, 20 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent.pm

  Log Message:
  -----------
  bump version


  Commit: 0de8c0e32539111fd5b470ef79e64f6b8d62c0f5
      https://github.com/fusinv/fusioninventory-agent/commit/0de8c0e32539111fd5b470ef79e64f6b8d62c0f5
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-05-21 (Mon, 21 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent/HTTP/Client/OCS.pm
    M lib/FusionInventory/Agent/XML/Query.pm

  Log Message:
  -----------
  avoid Compress::Zlib "Wide character" error

Compress::Zlib try to do a utf8::downgrade on the string to
compress. This will fail if the UTF8 content can't be converted
to the local encoding.

To avoid problem, we convert the string to pure-ASCII string.

see: commit:f791c0eb973ebb4e8f2658d069116cce07bd9553


  Commit: 0e1c646270ae5faafdc7d59d94f6cb641d9b9c7b
      https://github.com/fusinv/fusioninventory-agent/commit/0e1c646270ae5faafdc7d59d94f6cb641d9b9c7b
  Author: Guillaume Rousse <guillomovitch at gmail.com>
  Date:   2012-05-21 (Mon, 21 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent/HTTP/Client/OCS.pm
    M lib/FusionInventory/Agent/XML/Query.pm

  Log Message:
  -----------
  allow arbitrary XML output encoding

And don't mess with encoding specification in XML header.


  Commit: 240c607d38b747680364d3d86efd84b2f5110d77
      https://github.com/fusinv/fusioninventory-agent/commit/240c607d38b747680364d3d86efd84b2f5110d77
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-05-22 (Tue, 22 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent/HTTP/Client/OCS.pm
    M lib/FusionInventory/Agent/XML/Query.pm

  Log Message:
  -----------
  better fix for "Wide character" error

This patch replaces changes:
 commit:0de8c0e32539111fd5b470ef79e64f6b8d62c0f5
 commit:0e1c646270ae5faafdc7d59d94f6cb641d9b9c7b

We use encode("UTF-8", $string) to get an UTF-8 string without
the UTF8 flag. By doing so, Compress::Zlib is still able to do
utf8::downgrade() on the string.
Actually, we mimic the previous behavior.


  Commit: 6aefa346ad05a486b8c74fc94b73fffe2ec15d4c
      https://github.com/fusinv/fusioninventory-agent/commit/6aefa346ad05a486b8c74fc94b73fffe2ec15d4c
  Author: Vincent Membré <vincent.membre at normation.com>
  Date:   2012-05-22 (Tue, 22 May 2012)

  Changed paths:
    M lib/FusionInventory/Agent/Task/Inventory/Input/MacOS/CPU.pm
    M t/inventory/macos/cpu.t

  Log Message:
  -----------
  working tests for cpu on macos : ref #1597


  Commit: c07208b3d3ed16f6a964d296eb14ae5ef3393e19
      https://github.com/fusinv/fusioninventory-agent/commit/c07208b3d3ed16f6a964d296eb14ae5ef3393e19
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-05-22 (Tue, 22 May 2012)

  Changed paths:
    M Changes
    M lib/FusionInventory/Agent.pm
    M lib/FusionInventory/Agent/HTTP/Client/OCS.pm
    M lib/FusionInventory/Agent/Task/Inventory/Input/Win32/User.pm
    M lib/FusionInventory/Agent/Tools/Win32.pm
    M lib/FusionInventory/Agent/XML/Query.pm

  Log Message:
  -----------
  Merge branch '2.2.x' into 2.2.x-without-charset-changes


Compare: https://github.com/fusinv/fusioninventory-agent/compare/cfbd147...c07208b


More information about the Fusioninventory-commit mailing list