Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

UTF-8 support #2

Open
Lakritzator opened this issue Jan 20, 2016 · 2 comments
Open

UTF-8 support #2

Lakritzator opened this issue Jan 20, 2016 · 2 comments

Comments

@Lakritzator
Copy link

If I understood the specifications correctly, DNS support UTF-8 (at least partly) for some time now.
A change to your library which actually should not break anything (ASCII and UTF-8 are quite compatible) would be if you build strings from byte-arrays with Encoding.UTF-8.GetString(byte-array) instead of adding them to a StringBuilder byte by byte.

I found a fork of your project here, where the person changed the project to support the .NET Core:
https://github.com/alanta/Heijden.Dns
This might be interesting.

But what I found more interesting in his changes is this commit:
https://github.com/alanta/Heijden.Dns/commit/98785aa8f024ecbf9497ce0d8940ad7c58253414
In ReadString he builds the string with Encoding.ASCII.GetString, when that would use Encoding.UTF8.GetString instead one part is already complete.. similar it should work for ReadDomainName.

@ghuntley
Copy link
Owner

Hey @Lakritzator I'm not currently using this library (anymore) at any of my clients, more than willing to add yourself or anyone else as a contributor, so that this library can keep growing.

@Lakritzator
Copy link
Author

I was using this here: https://github.com/onovotny/Zeroconf
Which also builds on the code of Heijden, which was embedded, so I looked at a nuget package with the same content. This is how I got here...

I didn't use your library directly, so I'm not really an expert nor had the need to resolve DNS records myself.

Anyway, I will have a look at it, maybe I do have an interest.. and report back. But Greenshot already occupies most of my time, the rest is taken by another new project "dapplo" which is currently work in progress...

P.S.
Did you ever contact Alphons van der Heijden himself?
Maybe he has an interest himself, his code seems to be used a lot. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants