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

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. :stuck_out_tongue:

** 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.)