Developer forum

Forum » Feature requests » Item publisher not sorting the Faroese alphabet correct

Item publisher not sorting the Faroese alphabet correct

Hans Ravnsfjall
Hans Ravnsfjall
Reply

The Faroese Alfabeth is as such https://da.wikipedia.org/wiki/F%C3%A6r%C3%B8sk_(sprog)

 

But the system does not sort correctly when sorting alphabetically. Eg. รก and a are mixed as if it is the same character. This problem has to be sorted (No pun intended).

 

/Hans


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Hans,

Have you selected the correct regional settings, Faroese (Faroe Islands), on the website?

See https://doc.dynamicweb.com/documentation-9/content/content/websites-language-layers#3209

The regional settings are mapped to SQL collation (sorting is handled by SQL Server in this case) - and Faroese (fo-FO) is mapped to "Latin1_General_CI_AS" collation, which is what SQL Server uses for Faroese...

https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-ver15

Best regards,
Morten

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

 

yes, the regional settings is set to Faroese

 

/Hans

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

You are right. It seems that sorting with Latin1_General_CI_AS collation doesn't distinguish between those letters so the order appears to be "random". This also seems to be the way Faroese was sorted in the old days (as mentioned in the wikipedia article). There doesn't seem to be any better alternative when sorting Faroese in SQL Server. Do you know of any?

A possible workaround is to change regional settings to "Icelandic (Iceland)" - No, it's not Faroese, but I think you will get the sorting you need :)

Another option is to sort the list of items in a custom razor template. This requires that you fetch all items without any paging.

/Morten

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

You are Right Morten

 

That does the trick for this specific site at least.

 

/Hans