Skip to content

Comments

fix: Profiler doesn't handle UTF-8 files with BOM correctly.#3347

Merged
jaffinito merged 8 commits intomainfrom
fix/linux-bom-regression
Dec 10, 2025
Merged

fix: Profiler doesn't handle UTF-8 files with BOM correctly.#3347
jaffinito merged 8 commits intomainfrom
fix/linux-bom-regression

Conversation

@jaffinito
Copy link
Member

@jaffinito jaffinito commented Dec 8, 2025

Description

There was a regression caused by another fix, #3172, for handling wide characters properly. This swaps from wchar_t to xchar_t, which handles the differences better.

This was tested on ubuntu, fedora, alpine, and Windows with newrelic.config files and custom instrumentation files contain with a BOM and non-english characters (Japanese).

Author Checklist

  • Unit tests, Integration tests, and Unbounded tests completed
  • Performance testing completed with satisfactory results (if required)

Reviewer Checklist

  • Perform code review
  • Pull request was adequately tested (new/existing tests, performance tests)

@jaffinito jaffinito requested a review from a team as a code owner December 8, 2025 20:53
@nrcventura
Copy link
Member

Should we add a regression test for this?

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.35%. Comparing base (3430d26) to head (3495c54).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3347      +/-   ##
==========================================
+ Coverage   82.33%   82.35%   +0.02%     
==========================================
  Files         495      495              
  Lines       32094    32094              
  Branches     3736     3736              
==========================================
+ Hits        26423    26430       +7     
+ Misses       4796     4790       -6     
+ Partials      875      874       -1     
Flag Coverage Δ
Agent 83.58% <ø> (+0.02%) ⬆️
Profiler 70.40% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Agent/NewRelic/Profiler/Common/FileUtils.h 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

4 participants