1

how to force the rails form to accept utf headers code:

str += '<form id=\"uploadformWebkit\" class=\"webkitUploadForm\"action=\"<%=APP_CONFIG[:ssl_url]%>/docs/upload_folder\" enctype=\"multipart/form-data\" method=\"post\">';

how to force utf-8 here?

kannathasan
  • 565
  • 7
  • 21
  • 1.) Within Form helper tag...
    2.) read this for @ http://stackoverflow.com/questions/12947910/force-strings-to-utf-8-from-any-encoding
    – Alok Anand Jan 24 '14 at 12:35

2 Answers2

1

I use simple_form. I believe thats the default Content-Type if you have not tampered with the default settings during setup.

enter image description here

Also you will see additional utf8 parameter that gets posted along with other params:

enter image description here

Raj
  • 22,346
  • 14
  • 99
  • 142
0

1.) Within Form helper tag...

<form accept-charset="UTF-8" action="/users/1" method="post">

2.) read this for @ Force strings to UTF-8 from any encoding

Community
  • 1
  • 1
Alok Anand
  • 3,346
  • 1
  • 20
  • 17
  • in rails form this can be possible. but html form LIKE str += '
    /docs/upload_folder\" enctype=\"multipart/form-data\" method=\"post\">';
    – kannathasan Jan 24 '14 at 12:48