Encoding::UndefinedConversionError when file name has non-standard characters
226 views
Skip to first unread message
Przemek M.
unread,
Oct 17, 2010, 10:30:10 AM10/17/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dragonfly
Using dragonfly (0.7.6), Rails (3.0.1), Ruby (1.9.2) I have the
following error:
Encoding::UndefinedConversionError in UsersController#create
"\xC4" from ASCII-8BIT to UTF-8
This error occurs when I try to upload an image that has some non-
standard characters in filename (I mean Polish chars like: ąśźłó).
What can I do to avoid this error? Could I overwrite somehow the
original filename before it is being processed by Dragonfly?
Or perhaps there is some other solution?
Przemek M.
unread,
Oct 17, 2010, 2:56:28 PM10/17/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dragonfly
As the error seems to be related with Rails itself, my question would
be now: how can I validate the name of the file to not contain
problematic characters?
zoopzoop
unread,
Oct 27, 2010, 6:51:30 AM10/27/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message