Skyost / Bonsoir

A Zeroconf library that allows you to discover network services and to broadcast your own. Based on Apple Bonjour and Android NSD.
http://bonsoir.skyost.eu/
Other
100 stars 43 forks source link

Specific characters are missing #90

Closed heiha100 closed 2 months ago

heiha100 commented 3 months ago

Describe the bug I put a string: 'hello的macbook' in attributes of BonsoirService, but resolved result gets wrong string of 'hello的macbo', the characters of 'ok' are missing. To Reproduce You could modify the example of this repo to reproducing bug. Steps to reproduce the behavior:

  1. open app_service.dart, and modify the attribute of os to 'hello的macbook'
  2. run app and resolve the service of current device
  3. you could see wrong os with 'hello的macbo'

Expected behavior The resolved attributes should keep same with passing in.

Screenshots

image image

Desktop (please complete the following information):

Skyost commented 2 months ago

Hey,

It looks like a problem with key/value length limit :

Each constituent string of a DNS TXT record is limited to 255 bytes.

Attributes are normalized to comply with this.

heiha100 commented 2 months ago

Hey,

It looks like a problem with key/value length limit :

Each constituent string of a DNS TXT record is limited to 255 bytes.

Attributes are normalized to comply with this.

I don't think so. Because it's only occurs on macos, and I try modify 'os' on android, everything is ok.

image