Loading ...
Sorry, an error occurred while loading the content.

Diacritics problem with AnnotatedMaps

Expand Messages
  • jchodk
    Hi, In the The following HTML, the hungarian text (in TD tag) M3Bag Autómentés Bt. displays well in IE, but when I open the AnnotatedMaps defined by input
    Message 1 of 6 , Oct 26, 2007
    View Source
    • 0 Attachment
      Hi,

      In the The following HTML, the hungarian text (in TD tag) "M3Bag
      Autómentés Bt." displays well in IE, but when I open the
      AnnotatedMaps defined by input tag "xmlsrc", IE displays "M3Bag
      Autómentés Bt." in Smartview and in popup window.

      Any help or suggestion? (Except changing my page charset, it's a
      requirement!)

      Jérôme


      <html>
      <head>
      <title>Search suppliers</title>
      <META http-equiv="Content-Type" Content="text/html; charset=ISO-8859-
      15">
      [...]
      <TD class="TD_LISTE" nowrap>M3Bag Autómentés Bt.</TD>
      [...]
      <input name="xmlsrc" id="xmlsrc" type="hidden" value="<?xml
      version='1.0' encoding='ISO-8859-15'?><rss version='2.0'
      xmlns:geo='http://www.w3.org/2003/01/geo/wgs84_pos#'
      xmlns:ymaps='http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd'>
      <channel><title>EGSD Map</title><description>EGSD
      Map</description><image><description>EGSD Supplier
      Localisation</description><link>XXXX</link><url>XXXX</url><width>100</
      width><height>61</h
      eight></image>
      <item><title>M3Bag Autómentés Bt.</title><description>Priority :1
      Distance :32</description><geo:lat>47.63</geo:lat><geo:long>19.48</geo
      :long><ymaps:BaseIcon>XXXX</ymaps:BaseIcon></item>
      </channel></rss>">
    • Alan Brown
      There’s one thing you must do, and another thing you might have to do. You MUST put a CDATA section around that can contain, e.g., M3Bag Autómentés
      Message 2 of 6 , Oct 26, 2007
      View Source
      • 0 Attachment
        There’s one thing you must do, and another thing you might have to do.



        You MUST put a CDATA section around that can contain, e.g.,



        <title>M3Bag Autómentés Bt.</title>





        Should be



        <title><![CDATA[M3Bag Autómentés Bt.]]></title>



        This eliminates the need to represent special characters with an escape
        sequence (in other words, with CDATA you can have a plain comma – “,” -
        instead of “%2C”)



        I don’t know if this is enough to handle a latin-1 character set, so I’ll
        tell you what you might have to do – entity encoding. Look at the XML here:



        http://mapnut.com/asaotest2.xml



        See references such as ユ ? That calls out the specific Unicode
        character to be displayed. Using the simple API to display this GeoRSS XML
        file:



        http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps?appid=YahooDemo
        <http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps?appid=YahooDemo&xmlsrc=http
        ://mapnut.com/asaotest2.xml> &xmlsrc=http://mapnut.com/asaotest2.xml



        and click on the icon – you’ll notice Japanese characters (which are correct
        – I double checked. :-) )



        Here’s another example, using the same XML file with the FLASH api:



        http://mapnut.com/asaotest.html



        Now, of course, you need a way to generate the entity references. I don’t
        know what language you’re using to generate the XML, but here’s some
        javascript:



        http://mapnut.com/chinese3.html



        View the source. You’ll see a simple function, called “GenEntityRef”, which
        takes a Unicode string and converts everything within it into entity
        references. It’s not a particularly smart routine, since normal ascii
        characters don’t need to be converted into entity references (safe bet –
        anything with a character code less than 128). But it does the trick. I’m
        not generating XML here, but the principle still applies.



        Hope that helps.



        -Alan





        _____

        From: yws-maps@yahoogroups.com [mailto:yws-maps@yahoogroups.com] On Behalf
        Of jchodk
        Sent: Friday, October 26, 2007 4:44 AM
        To: yws-maps@yahoogroups.com
        Subject: [yws-maps] Diacritics problem with AnnotatedMaps



        Hi,

        In the The following HTML, the hungarian text (in TD tag) "M3Bag
        Autómentés Bt." displays well in IE, but when I open the
        AnnotatedMaps defined by input tag "xmlsrc", IE displays "M3Bag
        Autómentés Bt." in Smartview and in popup window.

        Any help or suggestion? (Except changing my page charset, it's a
        requirement!)

        Jérôme

        <html>
        <head>
        <title>Search suppliers</title>
        <META http-equiv="Content-Type" Content="text/html; charset=ISO-8859-
        15">
        [...]
        <TD class="TD_LISTE" nowrap>M3Bag Autómentés Bt.</TD>
        [...]
        <input name="xmlsrc" id="xmlsrc" type="hidden" value="<?xml
        version='1.0' encoding='ISO-8859-15'?><rss version='2.0'
        xmlns:geo='http://www.w3 <http://www.w3.org/2003/01/geo/wgs84_pos>
        org/2003/01/geo/wgs84_pos#'
        xmlns:ymaps='http://api.maps
        <http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd>
        yahoo.com/Maps/V1/AnnotatedMaps.xsd'>
        <channel><title>EGSD Map</title><description>EGSD
        Map</description><image><description>EGSD Supplier
        Localisation</description><link>XXXX</link><url>XXXX</url><width>100</
        width><height>61</h
        eight></image>
        <item><title>M3Bag Autómentés Bt.</title><description>Priority :1
        Distance :32</description><geo:lat>47.63</geo:lat><geo:long>19.48</geo
        :long><ymaps:BaseIcon>XXXX</ymaps:BaseIcon></item>
        </channel></rss>">





        [Non-text portions of this message have been removed]
      • Alan Brown
        Oh – one other tip – when you go to a web page with XML, be sure to “view source” from your browser. If you look at the XML in the normal browser
        Message 3 of 6 , Oct 26, 2007
        View Source
        • 0 Attachment
          Oh – one other tip – when you go to a web page with XML, be sure to “view
          source” from your browser. If you look at the XML in the normal browser
          window, it

          doesn’t show the “CDATA” sections – which are important.



          _____

          From: yws-maps@yahoogroups.com [mailto:yws-maps@yahoogroups.com] On Behalf
          Of Alan Brown
          Sent: Friday, October 26, 2007 10:54 AM
          To: yws-maps@yahoogroups.com
          Subject: RE: [yws-maps] Diacritics problem with AnnotatedMaps



          There’s one thing you must do, and another thing you might have to do.

          You MUST put a CDATA section around that can contain, e.g.,

          <title>M3Bag Autómentés Bt.</title>

          Should be

          <title><![CDATA[M3Bag Autómentés Bt.]]></title>

          This eliminates the need to represent special characters with an escape
          sequence (in other words, with CDATA you can have a plain comma – “,” -
          instead of “%2C”)

          I don’t know if this is enough to handle a latin-1 character set, so I’ll
          tell you what you might have to do – entity encoding. Look at the XML here:

          http://mapnut. <http://mapnut.com/asaotest2.xml> com/asaotest2.xml

          See references such as ユ ? That calls out the specific Unicode
          character to be displayed. Using the simple API to display this GeoRSS XML
          file:

          http://api.maps.
          <http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps?appid=YahooDemo>
          yahoo.com/Maps/V1/AnnotatedMaps?appid=YahooDemo
          <http://api.maps.
          <http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps?appid=YahooDemo&xmlsrc=http
          > yahoo.com/Maps/V1/AnnotatedMaps?appid=YahooDemo&xmlsrc=http
          ://mapnut.com/asaotest2.xml> &xmlsrc=http://mapnut.
          <http://mapnut.com/asaotest2.xml> com/asaotest2.xml

          and click on the icon – you’ll notice Japanese characters (which are correct
          – I double checked. :-) )

          Here’s another example, using the same XML file with the FLASH api:

          http://mapnut. <http://mapnut.com/asaotest.html> com/asaotest.html

          Now, of course, you need a way to generate the entity references. I don’t
          know what language you’re using to generate the XML, but here’s some
          javascript:

          http://mapnut. <http://mapnut.com/chinese3.html> com/chinese3.html

          View the source. You’ll see a simple function, called “GenEntityRef”, which
          takes a Unicode string and converts everything within it into entity
          references. It’s not a particularly smart routine, since normal ascii
          characters don’t need to be converted into entity references (safe bet –
          anything with a character code less than 128). But it does the trick. I’m
          not generating XML here, but the principle still applies.

          Hope that helps.

          -Alan

          _____

          From: yws-maps@yahoogroup <mailto:yws-maps%40yahoogroups.com> s.com
          [mailto:yws-maps@yahoogroup <mailto:yws-maps%40yahoogroups.com> s.com] On
          Behalf
          Of jchodk
          Sent: Friday, October 26, 2007 4:44 AM
          To: yws-maps@yahoogroup <mailto:yws-maps%40yahoogroups.com> s.com
          Subject: [yws-maps] Diacritics problem with AnnotatedMaps

          Hi,

          In the The following HTML, the hungarian text (in TD tag) "M3Bag
          Autómentés Bt." displays well in IE, but when I open the
          AnnotatedMaps defined by input tag "xmlsrc", IE displays "M3Bag
          Autómentés Bt." in Smartview and in popup window.

          Any help or suggestion? (Except changing my page charset, it's a
          requirement!)

          Jérôme

          <html>
          <head>
          <title>Search suppliers</title>
          <META http-equiv="Content-Type" Content="text/html; charset=ISO-8859-
          15">
          [...]
          <TD class="TD_LISTE" nowrap>M3Bag Autómentés Bt.</TD>
          [...]
          <input name="xmlsrc" id="xmlsrc" type="hidden" value="<?xml
          version='1.0' encoding='ISO-8859-15'?><rss version='2.0'
          xmlns:geo='http://www.w3. <http://www.w3.
          <http://www.w3.org/2003/01/geo/wgs84_pos> org/2003/01/geo/wgs84_pos>
          org/2003/01/geo/wgs84_pos#'
          xmlns:ymaps='http://api.maps.
          <http://api.maps. <http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd>
          yahoo.com/Maps/V1/AnnotatedMaps.xsd>
          yahoo.com/Maps/V1/AnnotatedMaps.xsd'>
          <channel><title>EGSD Map</title><description>EGSD
          Map</description><image><description>EGSD Supplier
          Localisation</description><link>XXXX</link><url>XXXX</url><width>100</
          width><height>61</h
          eight></image>
          <item><title>M3Bag Autómentés Bt.</title><description>Priority :1
          Distance :32</description><geo:lat>47.63</geo:lat><geo:long>19.48</geo
          :long><ymaps:BaseIcon>XXXX</ymaps:BaseIcon></item>
          </channel></rss>">

          [Non-text portions of this message have been removed]





          [Non-text portions of this message have been removed]
        • Alan Brown
          On more time, dropping “http:” from the URLS because yahoo groups doesn’t likeURLS :-( There’s one thing you must do, and another thing you might have
          Message 4 of 6 , Oct 26, 2007
          View Source
          • 0 Attachment
            On more time, dropping “http:” from the URLS because yahoo groups doesn’t
            likeURLS :-(

            There’s one thing you must do, and another thing you might have to do.

            You MUST put a CDATA section around that can contain, e.g.,

            <title>M3Bag Autómentés Bt.</title>

            Should be

            <title><![CDATA[M3Bag Autómentés Bt.]]></title>

            This eliminates the need to represent special characters with an escape
            sequence (in other words, with CDATA you can have a plain comma – “,” -
            instead of “%2C”)

            I don’t know if this is enough to handle a latin-1 character set, so I’ll
            tell you what you might have to do – entity encoding. Look at the XML here:

            mapnut.com/asaotest2.xml

            See references such as ユ . That calls out the specific Unicode
            character to be displayed. Using the simple API to display this GeoRSS XML
            file:

            api.maps.yahoo.com/Maps/V1/AnnotatedMaps?appid=YahooDemo&xmlsrc=http://mapnu
            t.com/asaotest2.xml

            and click on the icon – you’ll notice Japanese characters (which are correct
            – I double checked. :-) )

            Here’s another example, using the same XML file with the FLASH api:

            mapnut.com/asaotest.html

            Now, of course, you need a way to generate the entity references. I don’t
            know what language you’re using to generate the XML, but here’s some
            javascript:

            mapnut.com/chinese3.html

            View the source. You’ll see a simple function, called “GenEntityRef”, which
            takes a Unicode string and converts everything within it into entity
            references. It’s not a particularly smart routine, since normal ascii
            characters don’t need to be converted into entity references (safe bet –
            anything with a character code less than 128). But it does the trick. I’m
            not generating XML here, but the principle still applies.

            Hope that helps.

            -Alan

            _____

            From: yws-maps@yahoogroup <mailto:yws-maps%40yahoogroups.com> s.com
            [mailto:yws-maps@yahoogroup <mailto:yws-maps%40yahoogroups.com> s.com] On
            Behalf
            Of jchodk
            Sent: Friday, October 26, 2007 4:44 AM
            To: yws-maps@yahoogroup <mailto:yws-maps%40yahoogroups.com> s.com
            Subject: [yws-maps] Diacritics problem with AnnotatedMaps

            Hi,

            In the The following HTML, the hungarian text (in TD tag) "M3Bag
            Autómentés Bt." displays well in IE, but when I open the
            AnnotatedMaps defined by input tag "xmlsrc", IE displays "M3Bag
            Autómentés Bt." in Smartview and in popup window.

            Any help or suggestion? (Except changing my page charset, it's a
            requirement!)

            Jérôme

            <html>
            <head>
            <title>Search suppliers</title>
            <META http-equiv="Content-Type" Content="text/html; charset=ISO-8859-
            15">
            [...]
            <TD class="TD_LISTE" nowrap>M3Bag Autómentés Bt.</TD>
            [...]
            <input name="xmlsrc" id="xmlsrc" type="hidden" value="<?xml
            version='1.0' encoding='ISO-8859-15'?><rss version='2.0'
            xmlns:geo='http://www.w3. <http://www.w3.
            <http://www.w3.org/2003/01/geo/wgs84_pos> org/2003/01/geo/wgs84_pos>
            org/2003/01/geo/wgs84_pos#'
            xmlns:ymaps='http://api.maps.
            <http://api.maps. <http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd>
            yahoo.com/Maps/V1/AnnotatedMaps.xsd>
            yahoo.com/Maps/V1/AnnotatedMaps.xsd'>
            <channel><title>EGSD Map</title><description>EGSD
            Map</description><image><description>EGSD Supplier
            Localisation</description><link>XXXX</link><url>XXXX</url><width>100</
            width><height>61</h
            eight></image>
            <item><title>M3Bag Autómentés Bt.</title><description>Priority :1
            Distance :32</description><geo:lat>47.63</geo:lat><geo:long>19.48</geo
            :long><ymaps:BaseIcon>XXXX</ymaps:BaseIcon></item>
            </channel></rss>">

            [Non-text portions of this message have been removed]





            [Non-text portions of this message have been removed]
          • jchodk
            Hi, Many thanxs for all these tips and suggestions, and sorry for the delay (vacations...). I will try them and give a feed back as soon as possible. Jérôme
            Message 5 of 6 , Nov 5, 2007
            View Source
            • 0 Attachment
              Hi,

              Many thanxs for all these tips and suggestions, and sorry for the
              delay (vacations...). I will try them and give a feed back as soon as
              possible.

              Jérôme CHODKIEWICZ


              --- In yws-maps@yahoogroups.com, "Alan Brown" <adbrown@...> wrote:
              >
              > On more time, dropping "http:" from the URLS because yahoo groups
              doesn't
              > likeURLS :-(
              >
              > There's one thing you must do, and another thing you might have to
              do.
              >
              > You MUST put a CDATA section around that can contain, e.g.,
              >
              > <title>M3Bag Autómentés Bt.</title>
              >
              > Should be
              >
              > <title><![CDATA[M3Bag Autómentés Bt.]]></title>
              >
              > This eliminates the need to represent special characters with an
              escape
              > sequence (in other words, with CDATA you can have a plain comma –
              "," -
              > instead of "%2C")
              >
              > I don't know if this is enough to handle a latin-1 character set,
              so I'll
              > tell you what you might have to do – entity encoding. Look at the
              XML here:
              >
              > mapnut.com/asaotest2.xml
              >
              > See references such as ユ . That calls out the specific
              Unicode
              > character to be displayed. Using the simple API to display this
              GeoRSS XML
              > file:
              >
              > api.maps.yahoo.com/Maps/V1/AnnotatedMaps?
              appid=YahooDemo&xmlsrc=http://mapnu
              > t.com/asaotest2.xml
              >
              > and click on the icon – you'll notice Japanese characters (which
              are correct
              > – I double checked. :-) )
              >
              > Here's another example, using the same XML file with the FLASH api:
              >
              > mapnut.com/asaotest.html
              >
              > Now, of course, you need a way to generate the entity references. I
              don't
              > know what language you're using to generate the XML, but here's some
              > javascript:
              >
              > mapnut.com/chinese3.html
              >
              > View the source. You'll see a simple function,
              called "GenEntityRef", which
              > takes a Unicode string and converts everything within it into entity
              > references. It's not a particularly smart routine, since normal
              ascii
              > characters don't need to be converted into entity references (safe
              bet –
              > anything with a character code less than 128). But it does the
              trick. I'm
              > not generating XML here, but the principle still applies.
              >
              > Hope that helps.
              >
              > -Alan
              >
            • jchodk
              Hi, I try all your advices without success, but I identify more acutely the problem source : CDATA nor entity coding are necessary if I access AnnotatedMaps
              Message 6 of 6 , Nov 6, 2007
              View Source
              • 0 Attachment
                Hi,

                I try all your advices without success, but I identify more acutely
                the problem source : CDATA nor entity coding are necessary if I
                access AnnotatedMaps using and URL to specify an XML file. The
                following
                h t t p://api.maps.yahoo.com/Maps/V1/annotatedMaps?
                appid=YahooDemo&xmlsrc=h t t p s://www.ea-holding.com/egsd/test.xml
                displays correctly my hungarian text.

                But if I tranmit exactly the same xml (even with cdata and entity
                coding) with :

                <input name="xmlsrc" id="xmlsrc" type="hidden" value=""<?xml
                version='1.0' encoding='iso-8859-15'?>[...]<item><title><![CDATA
                [M3Bag Autómentés Bt.]]></title>[...]</item></channel></rss>

                I get the usual garbage!

                And generating an xml file on my web server for every map request on
                my site isn't an option (well, a desesperate one).

                Have you any other ideas ?


                --- In yws-maps@yahoogroups.com, "Alan Brown" <adbrown@...> wrote:
                >
                > There's one thing you must do, and another thing you might have to
                do.
                >
                >
                >
                > You MUST put a CDATA section around that can contain, e.g.,
                >
                >
                >
                > <title>M3Bag Autómentés Bt.</title>
                >
                >
                >
                >
                >
                > Should be
                >
                >
                >
                > <title><![CDATA[M3Bag Autómentés Bt.]]></title>
                >
                >
                >
                > This eliminates the need to represent special characters with an
                escape
                > sequence (in other words, with CDATA you can have a plain comma –
                "," -
                > instead of "%2C")
                >
                >
                >
                > I don't know if this is enough to handle a latin-1 character set,
                so I'll
                > tell you what you might have to do – entity encoding. Look at the
                XML here:
                >
                >
                >
                > http://mapnut.com/asaotest2.xml
                >
                >
                >
                > See references such as ユ ? That calls out the specific
                Unicode
                > character to be displayed. Using the simple API to display this
                GeoRSS XML
                > file:
                >
                >
                >
                > http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps?appid=YahooDemo
                > <http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps?
                appid=YahooDemo&xmlsrc=http
                > ://mapnut.com/asaotest2.xml> &xmlsrc=http://mapnut.com/asaotest2.xml
                >
                >
                >
                > and click on the icon – you'll notice Japanese characters (which
                are correct
                > – I double checked. :-) )
                >
                >
                >
                > Here's another example, using the same XML file with the FLASH api:
                >
                >
                >
                > http://mapnut.com/asaotest.html
                >
                >
                >
                > Now, of course, you need a way to generate the entity references.
                I don't
                > know what language you're using to generate the XML, but here's some
                > javascript:
                >
                >
                >
                > http://mapnut.com/chinese3.html
                >
                >
                >
                > View the source. You'll see a simple function,
                called "GenEntityRef", which
                > takes a Unicode string and converts everything within it into entity
                > references. It's not a particularly smart routine, since normal
                ascii
                > characters don't need to be converted into entity references (safe
                bet –
                > anything with a character code less than 128). But it does the
                trick. I'm
                > not generating XML here, but the principle still applies.
                >
                >
                >
                > Hope that helps.
                >
                >
                >
                > -Alan
              Your message has been successfully submitted and would be delivered to recipients shortly.