We in Scandinavia love our “Æ,Ø,Å”. They enrich our language, but they can cause issues in Dynamics 365 F&O. Here are one specific example; When using Unified Pricing Management we can have attributes controlling pricing. Often the attributes have values containing “Æ,Ø,Å”. Like Vendor in EN-US = “Leverandør” in NB-NO. To speed up things, Microsoft have implemented hashing. To do this, the key is encoded like this:

The issue with System.Text.Encoding::Default.GetBytes(_hashKey) is that
- Depends on server locale (That is often Windows-1252 or similar)
- Breaks Scandinavian characters
- Causes non-deterministic hashes across environments
- Can change after OS updates
It is recommended to rather use UTF-8, explicitly. basically :
System.Byte[] hashKeyBytes = System.Text.Encoding::UTF8.GetBytes(_hashKey);
I did a search through all X++ code and there are 13 times that Encoding::Default is used:

I have alerted Microsoft already, but if you struggle with “Æ, Ø, Å”, then please look into if Encoding::Default is used somewhere.
“Blåbærsyltetøy- og småbåtshavnstøtte behandles som et avvik i Dynamics 365″