Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Special chars in wrong order when DataObject::get


Go to End


1277 Views

Avatar
elsbth

Community Member, 8 Posts

19 July 2010 at 9:56pm

I'm making a site with muliple languages (swedish, english, german, russian, french) and want to get databojects in alphabetical order when i write
$myObjects = DataObject::get('MyObject', '', 'Name ASC');

Example: When i get dataobjects with swedish names the letters å (&aring) and ä (ä) are treated like the letter a, and ö (ö) is treated like the letter o. å, ä, ö are the last three letters in the swedish alphabet and the objects come in the wrong order.

What can I do to get the right order from DataObject::get()?