confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
81 stars 866 forks source link

Use UTF-8 encoding when marshaling string values into librdkafka #266

Open mhowlett opened 7 years ago

mhowlett commented 7 years ago

Marshaling of string values into librdkafka (for topic names and config) is currently achieved by decorating method arguments with [MarshalAs(UnmanagedType.LPStr)]. It would be better to do this using a custom function that encodes values as UTF-8.

treziac commented 7 years ago

For reference: https://github.com/dotnet/coreclr/pull/4793/files

Only available in netcoreapp2.0 yet (not standard)