Skip to content

Set UTF-8 as the default code page on the manifest - #1537

Merged
val-ms merged 2 commits into
Cisco-Talos:mainfrom
Fi418:CLAM-1440
Jul 25, 2025
Merged

Set UTF-8 as the default code page on the manifest#1537
val-ms merged 2 commits into
Cisco-Talos:mainfrom
Fi418:CLAM-1440

Conversation

@Fi418

@Fi418 Fi418 commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

This is available since Windows 1903 but backwards compatible.

https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

For older versions the changes from #1461 could be used.

Fixes #1440.

@ember91

ember91 commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

LGTM (I'm the author of #1461)

@ember91

ember91 commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

Also see #1515 where a similar solution may be desirable.

This is available since Windows 1903 but backwards compatible.

https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
Signed-off-by: Sophie0x2E <219585213+Sophie0x2E@users.noreply.github.com>
@Fi418

Fi418 commented Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

There is still a bug in how cross-platform log messages are handled. Moving to draft.

@Fi418
Fi418 marked this pull request as draft July 9, 2025 22:23
@Fi418

Fi418 commented Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

It seems to be on mprintf, that should probably be handled as a separate issue.

@Fi418
Fi418 marked this pull request as ready for review July 9, 2025 23:03

@val-ms val-ms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing on my windows laptop, I was able to demonstrate the fix:

clamav-1/build on  PR-1537 [$?] via △ v3.29.0
❯ cp ..\unit_tests\input\freshclam_testfiles\test-6.cvd file_öταБЬℓσ.cvd

clamav-1/build on  PR-1537 [$?] via △ v3.29.0
❯ C:\Users\micasnyd\clams\clamav-1.3.1.win.x64\sigtool.exe --info .\file_öταБЬℓσ.cvd
LibClamAV Error: cl_cvdhead: Can't open file .\file_öταБЬℓσ.cvd
ERROR: cvdinfo: Can't read/parse CVD header of .\file_öτα??lσ.cvd

clamav-1/build on  PR-1537 [$?] via △ v3.29.0
❯ .\install\sigtool --info .\file_öταБЬℓσ.cvd
File: .\file_öταБЬℓσ.cvd
Build time: 22 Jun 2021 21:34 -0400
Version: 6
Signatures: 14
Functionality level: 81
Builder: micasnyd
MD5: 3e249e00076b0b15bb54ced37be880c7
Digital signature: Dou6ICRT5HwLTtLNYToHsMoLnt8tdcQOEECp/INsusRs9Rz4JGWU27W76btwjszaKIHnfgfyFjHzlsYJxTFZoeYFLyaC1nd+SNSWaMyKeNvzcTrtxKbc5WKs04ORp923pFkqymRhFNrRupa8tVyrp9XN9WbdxVJKZNHzB6npPPj
Verification OK.

Thank you @Sophie0x2E and sorry for the lag time with review.

@val-ms
val-ms merged commit 2e4d453 into Cisco-Talos:main Jul 25, 2025
22 of 24 checks passed
jhumlick pushed a commit to jhumlick/clamav that referenced this pull request Nov 4, 2025
…los#1537)

Set UTF-8 as the default code page on the manifest

This is available since Windows 1903 but backwards compatible.

https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

Add manifest to other binaries

---------

Signed-off-by: Sophie0x2E <219585213+Sophie0x2E@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

Windows: Log outputs OEM format, shows strange character encodings for unsupported utf8 characters in file names

3 participants