# Garbage characters being put into generate.sql

**URL:** <https://forums.toadworld.com/t/garbage-characters-being-put-into-generate-sql/1700>\
**Category:** Toad Data Modeler\
**Created:** [May 29, 2008, 9:32am UTC](https://forums.toadworld.com/t/garbage-characters-being-put-into-generate-sql/1700 "2008-05-29T09:32:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff.lanzarottaintel](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@jeff.lanzarottaintel](https://forums.toadworld.com/u/jeff.lanzarottaintel)\
**Post date:** [May 29, 2008, 9:32am UTC](https://forums.toadworld.com/t/garbage-characters-being-put-into-generate-sql/1700/1 "2008-05-29T09:32:30Z")

</div>

Hello,

I am having an issue with Toad. When I have it generate the DDL script (generate.sql) the 1st three bytes of the file are garbage characters. They are always ï»¿ which is Hex (ef bb bf).

Any ideas on why I am getting these strange characters in the file? I found out that Toad was doing be when I attempter to load this .sql file into SQL Server. It complained about invalid character.

Thanks,

Jeff

---

<div class="post-metadata">

**Author:** ![jeff.lanzarottaintel](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@jeff.lanzarottaintel](https://forums.toadworld.com/u/jeff.lanzarottaintel)\
**Post date:** [May 29, 2008, 10:33am UTC](https://forums.toadworld.com/t/garbage-characters-being-put-into-generate-sql/1700/2 "2008-05-29T10:33:38Z")

</div>

Oh, I am using TDM version 3.1.7.36

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [May 30, 2008, 1:20am UTC](https://forums.toadworld.com/t/garbage-characters-being-put-into-generate-sql/1700/3 "2008-05-30T01:20:52Z")

</div>

Hello Jeff,

The 1st three bytes of the file show in which encoding it is saved - UTF -8 in this case.

Please see:

> **[Byte order mark](https://en.wikipedia.org/wiki/Byte-order_mark)**
>
> The byte order mark (BOM) is a Unicode character, .mw-parser-output .monospaced{font-family:monospace,monospace}U+FEFF byte order mark (BOM), whose appearance as a magic number at the start of a text stream can signal several things to a program consuming the text:
> BOM use is optional. Its presence interferes with the use of UTF-8 by software that does not expect non-ASCII bytes at the start of a file but that could otherwise handle the text stream.
> Unicode can be encoded in units of 8-bit, 16...

Feel free to select another encoding for the generated script.  
Select the encoding in the Settings menu | Options | Physical Model | SQL Script area | Encoding Used for SQL Scripts.

Hope this will help.

Regards,

Vladka
