in reply to JSON::XS utf8 formatted string will not load into MYSQL json type column

no I'd expect the json type would accept these chars. I fixed the \n issue I think, with s/\\([a-z])/\\\\$1/g. It gets past the \n issue now.

But now I'm getting errors on ', like on the word "don't". Wow what a Friday nightmare this became!

Ill look into your DBI idea.. TY

>
  • Comment on Re: JSON::XS utf8 formatted string will not load into MYSQL json type column
  • Download Code

Replies are listed 'Best First'.
Re^2: JSON::XS utf8 formatted string will not load into MYSQL json type column
by Corion (Patriarch) on Aug 25, 2023 at 18:36 UTC

    This should be very little surprise. When you print out your SQL string, you will find that the ' in don't is read as terminating the quotes around '$_'. DBI placeholders circumvent the problem.

      Great idea I'm on it!