New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import study error #111

Closed
elisafilevich opened this Issue Oct 2, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@elisafilevich
Copy link

elisafilevich commented Oct 2, 2015

I inadvertently I had a few weird characters in my json data, like in the image below.
This led to database importing errors, and didn't let me import the study
screen shot 2015-10-02 at 16 08 16

@elisafilevich

This comment has been minimized.

Copy link

elisafilevich commented Oct 2, 2015

After long searches, the solution was:
take my json string, pass it through here: http://coderstoolbox.net/string/#!encoding=xml&action=decode&charset=utf_8

and then copy it into word, where the non-unicode characters are displayed (copying it directly into word reveales some, but not all non-valida characters). Remove the (?) (it's actually a little square with a question mark in it) and then copy them back in.

Is there a way that the submit button could also check for non-unicode characters so this doesn't happen? Would this also happen if the problem is in the 'comments' box, where no json is required?

@kristian-lange

This comment has been minimized.

Copy link
Member

kristian-lange commented Oct 2, 2015

It's MySQL's UTF-8 encoding. You created and exported your study locally with JATOS running a H2 database - but the JATOS you wanted to import your study to is using MySQL database. MySQL has trouble handling UTF-8 characters if they have more then 2 bytes. For more details here or here.

Possible solutions are:

  • Use H2 databases on your server
  • If you already have a MySQL database, change your encoding to utf8mb4 like described here or here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment