# Character set error when trying to import from web API: ContentType is invalid

**URL:** <https://community.easymorph.com/t/character-set-error-when-trying-to-import-from-web-api-contenttype-is-invalid/1793>\
**Category:** Support\
**Created:** [April 13, 2020, 10:59am UTC](https://community.easymorph.com/t/character-set-error-when-trying-to-import-from-web-api-contenttype-is-invalid/1793 "2020-04-13T10:59:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![okabak](https://community.easymorph.com/user_avatar/community.easymorph.com/okabak/32/1711_2.png) [@okabak](https://community.easymorph.com/u/okabak)\
**Post date:** [April 13, 2020, 10:59am UTC](https://community.easymorph.com/t/character-set-error-when-trying-to-import-from-web-api-contenttype-is-invalid/1793/1 "2020-04-13T10:59:44Z")

</div>

I'm getting the following error when I try to use "Import from Web API" action with the following API:

> **[BGG XML API2](https://boardgamegeek.com/wiki/page/BGG_XML_API2)**

> Error: The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set.  
> '"UTF-8"' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.  
> Parameter name: name  
> Source: action "Import from Web API", table "Imported table 1"

It seems to have something to do with how the API response wraps UTF-8 in quotation marks and EasyMorph doesn't seem to like this. Tested with Postman and it works fine.

Here is the header from the response that EasyMorph doesn't seem to like:  
`Content-Type: text/xml; charset="UTF-8"`

I think it expects the UTF-8 to be without quotation marks.

Is there any way to get around this?

---

<div class="post-metadata">

**Author:** ![ckononenko](https://community.easymorph.com/user_avatar/community.easymorph.com/ckononenko/32/7044_2.png) [@ckononenko](https://community.easymorph.com/u/ckononenko)\
**Post date:** [April 13, 2020, 1:30pm UTC](https://community.easymorph.com/t/character-set-error-when-trying-to-import-from-web-api-contenttype-is-invalid/1793/2 "2020-04-13T13:30:05Z")

</div>

Hi @okabak

Seems that quotation marks caused error (according to RFC 2616, quotation marks are not used for charset.) .  
For now, as workaround, you can use WebRequest action with enabled option "Failed if HTTP error, otherwise save response body to file" , and than process xml file via Import XML file action.

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [April 16, 2020, 1:41pm UTC](https://community.easymorph.com/t/character-set-error-when-trying-to-import-from-web-api-contenttype-is-invalid/1793/3 "2020-04-16T13:41:11Z")

</div>

Hi @okabak,

we've updated EasyMorph to accept `charset="UTF-8"` with the quotation marks. You can get the updated version from our download page: [https://easymorph.com/download.html](https://easymorph.com/download.html)
