# Tip: how 'undefined' in a loadVar text file is related to unicode and bbedit

**URL:** <https://forum.kirupa.com/t/tip-how-undefined-in-a-loadvar-text-file-is-related-to-unicode-and-bbedit/251942>\
**Category:** flash\
**Created:** [February 14, 2008, 5:14am UTC](https://forum.kirupa.com/t/tip-how-undefined-in-a-loadvar-text-file-is-related-to-unicode-and-bbedit/251942 "2008-02-14T05:14:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![auntialias](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/auntialias/32/3793_2.png) [@auntialias](https://forum.kirupa.com/u/auntialias)\
**Post date:** [February 14, 2008, 5:14am UTC](https://forum.kirupa.com/t/tip-how-undefined-in-a-loadvar-text-file-is-related-to-unicode-and-bbedit/251942/1 "2008-02-14T05:14:37Z")

</div>

I’ve been bothered by a problem with an undefined bit of text. Found the solution --it’s obscure-- and wish to write of it here in case someone else has the same problem. 😛

\*\* The setup:\*\* swf contains swf with loadVar text file (captions.txt). Things look fine when I view it locally, but when I view it on the server, the first text item shows up as ‘undefined.’ Other text loads okay.

In captions.txt, the variables began like this: [INDENT]&somevariable1=Something  
&somevariable2=Something Else  
[/INDENT] **The problem**  
captions.txt loaded, but somevariable1 did not. Instead of displaying “Something” it was displayed as ‘undefined.’

**How I stumbled onto the solution:**  
I’ve been editing the captions.txt using BBEdit 6.5 (on the Mac). Sometime back I’d read about saving files as UTF-8, or Unicode. I double-checked the settings\*, and started playing around with them. **I unchecked the Byte Order Mark item and lo! my undefined was defined once again.**

Attachment shows the menu settings that I used to successfully save the text file. (in BBEdit, this comes from the set of icon/menus on top window strip. Click the icon that looks like a page icon to see the menu.

\*(in original file, besides the weird undefined problem, I got weird display of characters instead of curly apostrophes. Still need to work on that one.)
