0

I received an 'xml' file, though it doesn't really seem like XML. I know it was exported from Microsoft Access or SQLServer. The file looks something like this:

>>> contents[:1000]
'\xef\xbb\xbf<?xml version="1.0"?><Report xmlns="Ascent_x0_Metadata_x0020_Report_x0020__x002ted" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="Ascent_x0020_Me0_Repo29__x0020_updated http://reportserver?
%2fAsata+Report+(by+Title+Letter)+updated&amp;rs%3aFormat=XML&amp;rc%3aSchema=True" 
Name="Ascent Report (by Title Letter) updated">
    <table1>
        <Detail_Collection>
            <Detail ISOCountry="AR" TitleSort="A Very Brady Sequel" 
                ReleaseYear="1996" TitleKind="N/A" TitleType="N/A"...

Additionally, I can't even open this file in TextMate -- every time I try to it crashes the program.

1
  • \xef\xbb\xbf is . I don't know if that helps, but that's that. It does look like XML to me. Just has some junk in the first couple bytes? Commented Feb 14, 2013 at 6:37

1 Answer 1

2

the first hex characters are the UTF-8 byte order mark (http://en.wikipedia.org/wiki/Byte_order_mark0xEF,0xBB,0xBF).

This just means what you received was encoded as UTF-8 and that you should treat it as such by setting the encoding of what you use to read it. The rest of the file looks ok as far XML goes.

Textmate should do fine with UTF-8, but perhaps the file is too big.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.