# How to detect text file encoding?

**URL:** https://www.finalbuilder.com/forums/t/how-to-detect-text-file-encoding/448
**Category:** Discussion
**Created:** [April 30, 2007, 12:10pm UTC](https://www.finalbuilder.com/forums/t/how-to-detect-text-file-encoding/448 "2007-04-30T12:10:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 30, 2007, 12:10pm UTC](https://www.finalbuilder.com/forums/t/how-to-detect-text-file-encoding/448/1 "2007-04-30T12:10:22Z")

</div>

We just discovered a subtle problem in our build. We are using DotNetNuke and store SQL scripts in files that are executed by the DotNetNuke installer. The problem was that our text was modified, and rendered with bugs, specifically the plus (+) sign was removed from our file,&nbsp;by what turned out to be DotNetNuke functionality to support internationalisation. This tooks us quite some time, so we want to imporve our build to detect this specific issue.

Visual Studio stores files as ANSI by default, we saved the file as UTF, and our build became green again.

My question to&nbsp;FinalBuilder is:

How can I get FinalBuilder to detect the text encoding of a file?

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [May 3, 2007, 1:56am UTC](https://www.finalbuilder.com/forums/t/how-to-detect-text-file-encoding/448/2 "2007-05-03T01:56:40Z")

</div>

Hi Espen,  
  
Sorry… can’t help you much with this one.&nbsp; afaik there’s no way to do this in JavaScript or VBScript, and there’s no built in actions to help you with this.&nbsp; I did come across the following link while googling, which might help you if you decide to write a small utility app to do the job:  
  
[http://www.codeproject.com/useritems/DetectEncoding.asp](http://www.codeproject.com/useritems/DetectEncoding.asp)
