3

I recently pushed my first Ruby on Rails app to Heroku and I have an issue with the sorting. I have swedish characters such as Å Ä and Ö which are not properly sorted. They are sorted as A A and O. I think this has to do with the locale setting of the postgresql database, correct?

Is it possible to change the locale to Swedish when I'm using a shared database on Heroku? If so, how do I do that?

If not, can I somehow order it correctly using some RoR-magic?

1 Answer 1

1

If you want to be on 'the cutting edge' you could use the new Heroku labs plugin https://github.com/heroku/heroku-labs which will let you enable Postgres 9.1 (as opposed to the default 8.3 Postgres) for your application and then use the 9.1 collation support.

As always, it's labs so that means it comes with risks but I'm yet to see heroku release to public beta and then yank it later.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you! Will have a look at that! :)
I just got a reply from heroku when asking about this plugin: devcenter.heroku.com/articles/labs-heroku-shared-postgresql which is what you mean I guess? In the response I got they wrote: "One of our data engineers just informed me that the following locales are supported: C en_US en_US.utf8 POSIX So no Swedish yet, but we're looking into it."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.