SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Evangelist tangledman's Avatar
    Join Date
    Sep 2005
    Location
    Puerto de Mazarron, Murcia, Spain
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    UTF 8 character encoding in XML file

    Dear Sitepointers,

    I am generating an XML file of translated terms

    http://www.spanishproperty.es/placeholders_xml.php

    The translated terms are held in the database and work fine on the web using UTF8

    However when I try and create an XML file I seem to have a problem with the character encoding.

    Any ideas?

    Thanks

    Will

  2. #2
    SitePoint Zealot
    Join Date
    Apr 2005
    Location
    London
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    first up, your <root> tag doesn't have a matching end tag.
    and there are some </placeholder> closing tags that don't match.

    I'd also try add utf-8 as the charset.
    your html header is currently
    Content-Type: text/html

    maybe it should contain something like:

    Content-Type: text/html; charset=utf-8

    or even
    Content-Type: text/xml

  3. #3
    SitePoint Evangelist tangledman's Avatar
    Join Date
    Sep 2005
    Location
    Puerto de Mazarron, Murcia, Spain
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Turns out the missing closing tags where enough to fix it.

    The declaration <?xml version="1.0" encoding="UTF-8"?> was correct.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •