I ran into an interesting issue, I'm not sure if this is something where Roda has better options available, or if this is just Rack behavior I'm stuck with...
I have a form that uploads multipart data, the form is set up for UTF-8 correctly, e.g.:
<form method="POST" action="/foo" enctype="multipart/form-data" accept-charset="UTF-8">
But no matter what I do, when I receive a file it comes in encoded in ASCII-8BIT.
In my route I access the file from the params like so:
file = params[:upload_file][:tempfile]
Then I do some stuff with the file - BUT - it panics if there are any special characters in it, and it turns out the reason is the upload process has changed the encoding.
I'm trying to figure out where in the call stack I could insert something to make that file stay UTF8. Any suggestions?
Thanks,
Andrew