Hi Bill, It seems to be encoding. Probably you get '9445 Sofa's Mill Rd' and not "9445 Sofa’s Mill Rd”. Maybe --data-urlencode solves this.
cURL > 7.18.0 has an option --data-urlencode Maybe I can help as old Perl coder if you mail the Perl/cURL you use now. - Martin On Sat, 6 Mar 2021 at 21:45, Bill Stephenson <b...@cherrypc.com.invalid> wrote: > I’m using Perl to convert old CGI.pm “save” files to JSON that look like > this: > > c_name=Joseph%20Semeister > c_address1=9445%20Sofa%27s%20Mill%20Rd > c_address2= > c_city=Red%20Tree > c_state=PA > c_zip=17356 > = > > and loading them into a CouchDB (v. 3.1.1) with curl but files with that " > %27 “ string hang with an error: > > malformed JSON string, neither tag, array, object, number, string or atom, > at character offset 0 (before "(end of string)") > > I’ve narrowed down the issue to that “%27” and I can remove that like so: > > $myJSON =~ s/'//; > > But that doesn’t preserve the original text string "9445 Sofa’s Mill Rd”. > > I’m not savvy enough to call this a “bug” but this doesn’t break on other > encoded text like “%20”. > > Anyone got any suggestions for how I might work around this? > > -- > > Kindest Regards, > > Bill Stephenson > > > > > >