# Merge charset wrong

**URL:** <https://pdfjs.community/t/merge-charset-wrong/682>\
**Category:** Technical Support\
**Created:** [April 5, 2021, 1:10pm UTC](https://pdfjs.community/t/merge-charset-wrong/682 "2021-04-05T13:10:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![elvisdosreis](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/elvisdosreis/32/311_2.png) [@elvisdosreis](https://pdfjs.community/u/elvisdosreis)\
**Post date:** [April 5, 2021, 1:10pm UTC](https://pdfjs.community/t/merge-charset-wrong/682/1 "2021-04-05T13:10:39Z")

</div>

I’m having trouble merging document, accented text is getting wrong charset.

```javascript
const xfdf = await this.annotManager.exportAnnotations({links: false, widgets: false});
    const fileData = await this.docViewer.getDocument().getFileData({});
    const blob = new Blob([fileData], {type: 'application/pdf'});

    const data = new FormData();
    data.append('xfdf', xfdf);
    data.append('file', blob);
    data.append('license', 'xxxxxxxxxx');

    // Process the file
    const response = await fetch('https://api.pdfjs.express/xfdf/merge', {
      method: 'post',
      body: data
    }).then(resp => resp.json());

```

---

_[View the full topic](https://pdfjs.community/t/merge-charset-wrong/682)._
