# Export adds 3 unexpected characters at beginning of output file

**URL:** https://community.mp3tag.de/t/export-adds-3-unexpected-characters-at-beginning-of-output-file/55023
**Category:** General Discussion
**Created:** [November 5, 2021, 7:20pm UTC](https://community.mp3tag.de/t/export-adds-3-unexpected-characters-at-beginning-of-output-file/55023 "2021-11-05T19:20:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jean-Louis](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@Jean-Louis](https://community.mp3tag.de/u/Jean-Louis)
#### Post date: [November 5, 2021, 7:20pm UTC](https://community.mp3tag.de/t/export-adds-3-unexpected-characters-at-beginning-of-output-file/55023/1 "2021-11-05T19:20:25Z")

</div>

Hello,

Here is a simple example of instructions I am using for exportation

$filename(txt,utf-8)$loop(%\_path%)%title%  
$loopend()

This creates a simple text file with one line per file in directory with just the title printed out.  
The issue is that three unexpected characters are added at the very beginning of first line.  
See for example the ascii dump of the 1st line of a file I just generated :  
0000000 o ; ? K i n d e r t o t e n l i  
Same dump in hexadecimal :  
0000000 bbef 4bbf 6e69 6564 7472 746f 6e65 696c

These extra characters are just messing up post processing or printing the file.

Any idea how to avoid this ?

Thanks

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [November 5, 2021, 8:57pm UTC](https://community.mp3tag.de/t/export-adds-3-unexpected-characters-at-beginning-of-output-file/55023/2 "2021-11-05T20:57:58Z")

</div>

Does this 3 character change, if you try it with

```auto
$filename(test.txt)
$filename(test.txt,ansi)
$filename(test.txt,utf-16)

```

As seen in

> **[Exporting Tag and File Information – Mp3tag Documentation](https://docs.mp3tag.de/export/#export-scripting-functions)**
>
> Documentation on exporting tag and file information to text-based file formats. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![Jean-Louis](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@Jean-Louis](https://community.mp3tag.de/u/Jean-Louis)
#### Post date: [November 5, 2021, 10:12pm UTC](https://community.mp3tag.de/t/export-adds-3-unexpected-characters-at-beginning-of-output-file/55023/3 "2021-11-05T22:12:15Z")

</div>

ansi is the correct setting. Many thanks !

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [December 5, 2021, 10:12pm UTC](https://community.mp3tag.de/t/export-adds-3-unexpected-characters-at-beginning-of-output-file/55023/4 "2021-12-05T22:12:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
