On 30-sep-2006, at 0:10, dp.lists wrote:

I'm reading in an XML file with fileIO and in the original test file I made, I got a few extra weird characters before the <?xml?> tag. They're not there now, after I've created a new .txt file and renamed it .xml.
But, other people will be editing this xml file, so how can I be sure
those characters won't creep in again? I suspect it had something to do
with encoding.  Aren't' there some bits that either appear or don't
appear at the beginning of a file depending on encoding? I'm not sure,
anyone have some thoughts?

Thanks,
- Michael M.

ultraedit is a very capable editor in the win* world and very helpful when it comes to utf encoding. I mention it as I just clicked on the hex-mode-button there to check which one they are. There are some variants of utf and they are identified by 2 bytes at the start, utf-8 has a FF FE. However, utf doesnt go well with director so you shouldn't use <? xml version="1.0" encoding="UTF-8"?> at all. <?xml version="1.0" encoding="ISO-8859-1"?> picks the right encoding for director and avoids editors inserting weired bytes at the same time.

That was a helpful explanation, thanks. I experienced the same issue.
FWIW, I've seen those bytes at the start of my xml files, but never had a problem so far. Even the Dir Xml Parser doesn't seem to mind them.

Mark Hagers
[EMAIL PROTECTED]


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to