internal server error when trying to upload an iso8859-1 encoded file

Subscribe to internal server error when trying to upload an iso8859-1 encoded file 7 posts, 4 voices

 
MCH Scriptwright

Hi,

I have a script that is encoded using the iso-8859-1 charset. But when trying to upload it on userscripts.org, I get an internal server error.
Uploading the same script in unicode encoding works fine.

But since the website the script modifies is using iso-8859-1, I want the script to also use this charset, because a user reported a problem with special characters when copying site content after manipulation by the unicode version of the script and inserting it into MS Word that doesn't occur when the script is not active.

So it would be useful to be able to upload an iso-8859-1 encoded file.

 
ScroogeMcPump Scriptwright

Vote for suggestion 9690 if you agree that this is a problem.

 
Tim McCormack Scriptwright

@MCH: You're going to have to convert all your international characters into named character entities. For example, Ö become Ö.

That's the price to pay for iso-8859-1 and all other non UTF-8 encodings.

 
Johan Sundström Scriptwright

-1. Your user's report is not script encoding related; Greasemonkey stores your script as UTF-8 anyway.

Your request would only add brittleness to the us.o system, and/or complexity, if the site successfully implements a built-in automatically-convert-any-encoding-to-UTF-8 function, which is a feat that requires a fairly tall wizard hat to pull off.

Us.o core devs are mainly native speakers of ASCII, so their hack time is probably better spent on other issues than rather tricky I18N conversion you are probably more likely to get right on your side of the wire every time, than they on theirs.

Tip: If you already host the script on a remote url, in whichever encoding, use http://userscripts.org/scripts/show/31234 instead and click its load button to load its contents into the userscripts.org textarea.

 
ScroogeMcPump Scriptwright
a fairly tall wizard hat to pull off

I can understand that, but can they at least have an error message that's a little friendlier than "500 Internal Server Error"? Something with an explanation of what went wrong and why? (I'd lend them my wizard hat, but it's probably even smaller than theirs.)

 
Johan Sundström Scriptwright

Showing proper error messages is of course always a good idea, though. :-) "Scripts uploaded to userscripts.org must be saved as unicode encoded as utf-8; this script was not legal utf-8. If you do not know how to do that, we suggest you paste the script contents into the text area instead to let your browser do the work for you." for instance. (Henrik probably has ideas to further improve that suggestion; he is a whiz about user friendly docs.)

 
ScroogeMcPump Scriptwright

That'd WFM. ;-)