IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
878 stars 487 forks source link

Helping beginning API users avoid character encoding errors (e.g. quotes) #6801

Closed jggautier closed 2 months ago

jggautier commented 4 years ago

Dataverse users who occasionally use the APIs (like the support team and superuser types described in the API guides intro) have been blocked by a common error where copying and pasting one of the guide's curl commands into a rich text editor (in order to add variables like their API key) and then into a terminal emulator causes quotes to turn into characters that the terminal doesn't recognize as quotes. When this is done, terminals like MacOS's report errors that don't really let the user know that the problem is the quote characters being used:

Screen Shot 2020-04-09 at 12 05 27 PM

(I've since changed my API key)

Some questions

BPeuch commented 4 years ago

Hello @jggautier.

We think that's a very good thing that you're looking into this issue.

Indeed the paradox is that, because preparing those curl commands requires a lot of care of and attention to detail — replace one character too many and the command becomes completely invalid, or in the worst-case scenario, it makes things go terribly wrong — admins wish that they could edit them in powerful, user-friendly text editors where font and and font size can be changed at leisure, thus ensuring optimal visibility and reducing the potential for error to a minimum… but the tendency of rich text editors to automatically replace characters adds a new layer of risk.

I'll try to see if it's possible to create a custom document in Microsoft Word in which the automatic replacement rules are waived. I know there's a functionality to make a number of rules apply to one document only. Then perhaps the same can be done in Open Office.

jggautier commented 2 months ago

I never really started looking into what could be done here, and since creating this issue I haven't heard folks running into these sorts of errors. I'm going to close this GitHub issue.