38
Views
2
Comments
sorts containing arabic language
Question

Hello, I have a text field on database, and here the user could enter arabic or english language. When I'm trying to sort, they are not sorted properly. Is there any way to solve this?

Thanks.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Mariana,

If you are sorting using the database, it's a database issue. If you are using an OutSystems cloud environment, contact OutSystems, though if it's a PE I'm not sure they can help you (as multiple users share the database). If it's an on-premise installation, contact your DBA.

2019-06-15 21-39-22
Afonso Carvalho
 
MVP

Hi Mariana,

Sounds like a Collation issue. You might have to speak with whoever is managing your database, but in the meantime, here's a couple of things you can try, assuming you're using SQL Server:

 - check this for a solid primer on how sorting orders are extrapolated from your database/field collation;

 - try querying your Entity in an advanced query and specifying a collation like this:

SELECT {ENTITY}.[Field] COLLATE Arabic_CI_AI_KS_WS AS CollatedColumn
FROM {ENTITY} 
ORDER BY 1

and see if the sorted fields are what you would expect.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.