Skip to content

Force Visual C++ to treat source files as UTF-8.#1789

Merged
Dead2 merged 1 commit intozlib-ng:developfrom
mtl1979:msvc-utf8
Sep 25, 2024
Merged

Force Visual C++ to treat source files as UTF-8.#1789
Dead2 merged 1 commit intozlib-ng:developfrom
mtl1979:msvc-utf8

Conversation

@mtl1979
Copy link
Copy Markdown
Collaborator

@mtl1979 mtl1979 commented Sep 18, 2024

See #1786.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.33%. Comparing base (5b04d9c) to head (85d52f4).
Report is 16 commits behind head on develop.

Current head 85d52f4 differs from pull request most recent head b599700

Please upload reports for the commit b599700 to get more accurate results.

❗ There is a different number of reports uploaded between BASE (5b04d9c) and HEAD (85d52f4). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5b04d9c) HEAD (85d52f4)
2 1
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1789       +/-   ##
============================================
- Coverage    83.02%   33.33%   -49.69%     
============================================
  Files          135       66       -69     
  Lines        10310     5504     -4806     
  Branches      2785     1227     -1558     
============================================
- Hits          8560     1835     -6725     
- Misses        1057     3411     +2354     
+ Partials       693      258      -435     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


# Force Visual C++ to use UTF-8
if(MSVC)
if (NOT CMAKE_C_FLAGS MATCHES "[\\/\\-]utf-8")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this require a check to see if it compiles with the flag?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

All supported Visual C++ versions recognize the flag. IF it errors out, the file is corrupted.

@Dead2 Dead2 merged commit 13d0a89 into zlib-ng:develop Sep 25, 2024
@Dead2 Dead2 mentioned this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants