Skip to main content

Hi guys,

I am trying to send a few request for every featrue individually using a Rest url (include spatial overlay) to the server in order to intersect between data in DB and input data. Then save the result in json file for every feature.

It might be genereted some duplicate features , therefore I saved the results a json files. Then the json files are read using FeatureReader. But the problem is some of json files format, which were generated using HttpCaller, have been changed to Ansi encoding instead of utf_8 encoding.

I dont know, how should I solve the error.

Any help, I would be pleased.

Thanks in advance

fme_error

My guess is the HTTPCaller uses the encoding in the response headers to write the file?

As an alternative you could write the _response_body to an attribute and then write the response to a file using a FeatureWriter. You than have more options regarding encoding in both the HTTPCaller and FeatureWriter.

I also want to point you to the TempPathnameCreator. This creates a temp folder at runtime. This way you don't have to clean up the temp files when processed.


Thanks nielsgerrits,

I have changed a bit workbench, but I got again error.

 

ERROR |A JSON syntax error was found at line 1, column 402

ERROR |A sequence of bytes was found which is invalid in the utf-8 encoding.

 

fme_error_2


Reply