Monday, June 22, 2020

How to set CurrentCulture for all threads in a domain in .NET 4.5


In your Main-Method add the following lines:


System.Globalization.CultureInfo.DefaultThreadCurrentCulture = new System.Globalization.CultureInfo("en-US");
System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = new System.Globalization.CultureInfo("en-US");

References:
morteza/how-to-set-currentculture-for-all-threads-in-a-domain-in-net-4-5
https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=netcore-3.1

Tuesday, April 28, 2020

Need <, >, & in an XML-Message? Use the XML escape characters!


For Errors like this in SoapUI?


Name cannot begin with the ' ' character, hexadecimal value 0x20.

Then please try escaping the critical characters!

Have a look here:

https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents


"   &quot;
'   &apos;
<   &lt;
>   &gt;
&   &amp;


https://validator.w3.org/#validate_by_input