# Weird characters with FinalBuilder files

**URL:** https://www.finalbuilder.com/forums/t/weird-characters-with-finalbuilder-files/3542
**Category:** Bugs
**Created:** [October 23, 2014, 3:53am UTC](https://www.finalbuilder.com/forums/t/weird-characters-with-finalbuilder-files/3542 "2014-10-23T03:53:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)
#### Post date: [October 23, 2014, 3:53am UTC](https://www.finalbuilder.com/forums/t/weird-characters-with-finalbuilder-files/3542/1 "2014-10-23T03:53:38Z")

</div>

Sometimes when I commit a file into source control (GitHub), I get a really strange result:  
  
\<?xml version="1.0" encoding="UTF-16"?\>  
਍㰀嘀匀堀䴀䰀㸀ഀഀ  
&nbsp;   
਍ 㰀倀爀漀瀀攀爀琀礀 䴀甀氀琀椀嘀愀氀甀攀㴀∀ ∀ 渀愀洀攀㴀∀䔀渀挀爀礀瀀琀攀搀䔀搀椀琀倀愀猀猀眀漀爀搀∀ 琀礀瀀攀㴀∀猀琀爀椀渀最∀㸀㰀⼀倀爀漀瀀攀爀琀礀㸀ഀഀ  
  
When I look at the file on GitHub, it looks ok:&nbsp;  
  
[https://raw.githubusercontent.com/Orcomp/Orchestra/develop/deployment/finalbuilder/Orchestra.CreatePackages.fbp7](https://raw.githubusercontent.com/Orcomp/Orchestra/develop/deployment/finalbuilder/Orchestra.CreatePackages.fbp7)  
  
Note that the files is used in combination with Continua CI, so might it have to do something with that? And since it is line-by-line, I thought of this:  
  
If the loading of a document fails, try to load again, but remove ever n(2) line (thus 2,4,6,8, etc). That’s what I do manually to fix the problem.

---

<div class="post-metadata">

### Author: ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)
#### Post date: [October 23, 2014, 4:19am UTC](https://www.finalbuilder.com/forums/t/weird-characters-with-finalbuilder-files/3542/2 "2014-10-23T04:19:25Z")

</div>

I opened up the file in notepad++ (the one without strange characters, which was 250 kb). Then I changed the encoding to UTF-8 and also updated the encoding attribute in the header. That seems to work (the file got twice as small) and is working now.   
  
 Why do you save as UTF-16 by default?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 23, 2014, 11:00am UTC](https://www.finalbuilder.com/forums/t/weird-characters-with-finalbuilder-files/3542/3 "2014-10-23T11:00:30Z")

</div>

UTF-16 is the default because the string types in Delphi and C# are UTF-16, means no encoding conversions when loading/saving. In FB8 the default will be UTF-8.

---

<div class="post-metadata">

### Author: ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)
#### Post date: [April 1, 2015, 1:50am UTC](https://www.finalbuilder.com/forums/t/weird-characters-with-finalbuilder-files/3542/4 "2015-04-01T01:50:03Z")

</div>

I have this issue sometimes:   
  
 @@log{message status=error, value=Error Loading Project File : Invalid at the top level of the document.   
  
 Line : 1   
 Char : 40 }   
  
 I just updated a file. Since the file is open-source, it should be fairly easy to check what’s wrong with this file?   
  
 [https://github.com/WildGums/Orchestra/blob/develop/deployment/finalbuilder/Orchestra.CreatePackages.fbp7](https://github.com/WildGums/Orchestra/blob/develop/deployment/finalbuilder/Orchestra.CreatePackages.fbp7)

---

<div class="post-metadata">

### Author: ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)
#### Post date: [April 1, 2015, 1:50am UTC](https://www.finalbuilder.com/forums/t/weird-characters-with-finalbuilder-files/3542/5 "2015-04-01T01:50:37Z")

</div>

And a fixed url so I can update it in the meantime:   
  
 [https://github.com/WildGums/Orchestra/blob/a2d32b3305e17461c9d0b90c967cfe52c962a196/deployment/finalbuilder/Orchestra.CreatePackages.fbp7](https://github.com/WildGums/Orchestra/blob/a2d32b3305e17461c9d0b90c967cfe52c962a196/deployment/finalbuilder/Orchestra.CreatePackages.fbp7)

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [April 2, 2015, 12:47pm UTC](https://www.finalbuilder.com/forums/t/weird-characters-with-finalbuilder-files/3542/6 "2015-04-02T12:47:41Z")

</div>

Hi Geert,   
  
 I can’t see the direct reason as to why this corruption occurred. Our only thoughts are around UTF16 not being supported by a number of tools out there. Git diff for example has issues with UTF16 files.   
  
 We suggest saving the file as UTF8 for compatibility. You can change the default settings in your FinalBuilder installation options.
