UTF-8 encoding problem

Discussion in 'XML' started by shreshth.luthra@gmail.com, Oct 18, 2006.

  1. Guest

    Hi All,

    I am having a GUI which accepts a Unicode string and searches a given
    set of xml files for that string.

    Now, i have 2 XML files both of them saved in UTF-8 format, having
    characters of different language.

    Although both of them are having UTF-8 as BoM, but only first file is
    having UTF-8 defined in XML declration at the top of the XML file as
    well.

    Now, when i search for some different langauge character in that
    directory using a third party GUI for desktop search, it shows that the
    charcter exist in the first file (in which XML declation was also
    there), but not in the second file (having only BoM)

    Initilally i thought that the problem is mainly because of UTF-8 being
    supporting both MultiBye and Unicode, but could not find much on it,
    because both of them had the same contents when opened in Binary mode
    (Except for XML Declaration in 1 of them)
    Please help.

    Regards,
    Shreshth
     
    , Oct 18, 2006
    #1
    1. Advertising

  2. In article <>,
    <> wrote:

    >Although both of them are having UTF-8 as BoM, but only first file is
    >having UTF-8 defined in XML declration at the top of the XML file as
    >well.


    Even without an xml declaration or BOM, the default encoding for XML
    is UTF-8. Are you really opening files, or are the documents coming
    from a web server that might be incorrectly serving them as, say,
    Latin-1?

    -- Richard
     
    Richard Tobin, Oct 18, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JJBW
    Replies:
    1
    Views:
    10,547
    Joerg Jooss
    Apr 24, 2004
  2. Replies:
    1
    Views:
    307
    Chris Uppal
    Oct 18, 2006
  3. Replies:
    6
    Views:
    478
    Bhushan
    Oct 19, 2006
  4. Replies:
    2
    Views:
    422
  5. Replies:
    2
    Views:
    412
    Nathan Keel
    Aug 14, 2009
Loading...

Share This Page