Reputation: 2606
I've spent several hours googling this and am getting nowhere.
I'm using a Rails 3 app and the fb_graph gem to post a message to a facebook wall. Posting the message all works fine - but I need to post a message with an e umlat charcter in it and this is not working.
This is the test code:
message = "efficiënte efficiënte"
me = FbGraph::User.me(self.access_token)
me.feed!(:message => message)
When run the message on facebook has the unknown character symbol for the first eumlat and just includes the raw entity like this:
effici�nte efficiënte
Presumably I need to encode the string in some special way - but I can find nothing in the documentation that tells me how to get this character to appear in the user's feed properly.
Can anone help?
Upvotes: 0
Views: 274
Reputation: 2606
OK - so no sooner do I post this than I work out what I was doing wrong.
The Faceboook API is expecting UTF8 (as you would imagine) and so the first encoding "efficiënte" should have just worked.
The issue was my Eclipse dev environment is not set to save files in UTF8 by default as I had assumed.
Once I changed the file encoding in Eclipse ot UFT8 sending the properly UTF8 encoded text "efficiënte" worked perfectly.
Hopefully this is of use to someone else.
Upvotes: 0