]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/user_preferences_controller.rb
Treat the body as UTF-8 for user_preferences#update
[rails.git] / app / controllers / api / user_preferences_controller.rb
index 02a23095addd70ef9a72dde3d84cad35a257b308..99d224c516ca5ec132f1ce236acea4ce3774fd3f 100644 (file)
@@ -66,7 +66,7 @@ module Api
         pref.k = params[:preference_key]
       end
 
-      pref.v = request.raw_post.chomp
+      pref.v = request.raw_post.chomp.force_encoding("UTF-8")
       pref.save!
 
       render :plain => ""