Hello,
In our software, we use an already defined device named "IoTDeviceCheck" (deviceId) to setup the connection with our IOT hub.
It is possible to create a DeviceClient with such deviceId with most culture info (en-us, de-ch,..) but not with "tr-TR" : it throws an exception "The connection string has an invalid value for property: DeviceId". Because in IotHubConnectionStringBuilder:ValidateFormat, regex.IsMatch(value) returns false.
The regex (IdNameRegex) for idName is "^[A-Za-z0-9-:.+%_#*?!(),=@;$']{1,128}$" with regexOptions = RegexOptions.Compiled | RegexOptions.IgnoreCase;
In Turkhish, this fails because the "i" character does not seem to match the a-z part of the regular expression (and because the RegexOptions.CultureInvariant is not used).
We now perform the setup of the communication using in a CultureInfo.InvariantCulture task and it solves the problem.
So this means that HostName, IdName and SharedAccessKeyName are culture dependent.
We had this issue only on setup but our application can be used by customers from many countries (so a device id could be created on a culture and then used in another one) so that could be a common limitation.
Could somebody confirm that HostName, IdName and SharedAccessKeyName are meant to be culture dependent? (I was not able to find any documentation about this).
(SharedAccessKeyRegex, SharedAccessSignatureRegex and X509CertRegex are also using the same regexOptions).
Thanks
Alex