Skip to content

Use TranscodingStream for converting to UTF-8#342

Open
erwinkramer wants to merge 1 commit intocloudevents:mainfrom
erwinkramer:feature/transcodingstream
Open

Use TranscodingStream for converting to UTF-8#342
erwinkramer wants to merge 1 commit intocloudevents:mainfrom
erwinkramer:feature/transcodingstream

Conversation

@erwinkramer
Copy link
Copy Markdown
Contributor

@erwinkramer erwinkramer commented Apr 10, 2026

This leverages CreateTranscodingStream to change the encoding to UTF-8 when required. Because this only exists on .NET 5 and up, I made it conditional and kept the old logic for lower .NET versions.

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Apr 11, 2026

This feels like it's reasonable - it's entirely an implementation detail, so a simple #if would be fine IMO.

Signed-off-by: Erwin <erwinkramer@hotmail.com>
@erwinkramer erwinkramer force-pushed the feature/transcodingstream branch from 54c9d75 to 9326f9e Compare April 12, 2026 08:24
@erwinkramer erwinkramer marked this pull request as ready for review April 12, 2026 08:26
@erwinkramer
Copy link
Copy Markdown
Contributor Author

@jskeet sure, I made it conditional now. Should be good to go.

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.

2 participants