We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26439
    • 104 Posts
    Double dotted e ( emulates) are turning up as question marks etc, etc., been trying all sorts of different doctypes, seems if one doctype works in FF it won’t work in IE and vica versa.

    Anyway the source is the problem, we’re used in a NewsListing snippet and the news has been pasted from Word probably.

    Does anyone have a handy solution?

    Here’s a quote from Tweakers.net which helped me when I was having the same trouble with an RSS feed....


    Dat ziet er uit als een UTF-8 string die wordt gelezen alsof het een ISO-8859-1 string is. Zorg eens dat het script charset=utf-8 in de content-type header meestuurt, of gebruik eens utf8_decode om er een iso-8859-1 string van te maken?

    ....translation


    It looks like a UTF-8 string that has been read as it is a ISO-8859-1 string. Ensure that charset=utf-8 is in content-type header, or use utf8_decode to make a iso-8859-1 string of it.
      • 7455
      • 2,204 Posts
      Bedoel je ë en ü etc?
      ik gebruik dat heel veel voor duitse sites die ik maakkijk maar op deze pagina:
      http://www.danielson.nl/Membraanschakelaars-Touchscreens-home-de-Industrial-Graphics.html
      daar zie je er een paar op de u en op de o geen problemen mee
      maar hoe plak je vanuit word? met of zonder opmaak? probeer ander de ë gewoon te typen (eerst "dan een e) en kijk of dat wel goed door komt of is het alleen waneer je newslisting gebruikt? of ook in de gekoppelde documenten?

      Groet,

      Dimitri
        follow me on twitter: @dimmy01
        • 26439
        • 104 Posts
        Quote from: Dimmy at May 15, 2006, 06:44 AM

        Bedoel je ë en ü etc?

        Indeed, and also the "een" with the dashes on top.

        This is more of a potential problem than a urgent one, as we are able to clean up wrong characters ourselves at the moment.

        What we have done is turned off the RTE on a modx install in the intention of keeping the code clean. Unfortunately that removes the "paste as Word" option from, I think, the FCKEditor.

        When text is pasted from word, by a third party perhaps, the problem arises.

        As I mentioned before I had this issue with a Dutch RSS feed, where I used a "utf8_decode" function to get the special characters to behave themselves. I was kind of hoping that maybe someone had made up a snippet or something that would do that.

        ...... but as I say, this is not an urgent problem at the moment.

        Thanks for your reply.
          • 7455
          • 2,204 Posts
          why not use past a plain text?

          Then style your content using css, this makes it much cleaner thats how I do that all the time
          to create é use ’ then e
            follow me on twitter: @dimmy01
            • 26439
            • 104 Posts
            Quote from: Dimmy at May 15, 2006, 03:01 PM

            why not use past a plain text?

            I do, Dimmy, the problem arises when some one else adds the content.
              • 30223
              • 1,010 Posts
              Bit late but perhaps this little plugin might do the trick for you? It’s a kind off last resort solution. It won’t help you storing the proper character entities in the content source but it will convert any leftover extended characters before they are displayed. The plugin will chop up the content and replace any extended characters in the text with it’s equivalent character entity. It will not translate any characters inside html (or other <...>) tags however.

              Create a new plugin and paste the below code (without the php tags - they’re only for the color coding) and check the onWebPagePrerender event on the System Events tab.
              <?php
              $e = &$modx->Event;
              switch ($e->name) {
              case "OnWebPagePrerender":
              $o = &$modx->documentOutput; // get a reference of the output
              $o = preg_replace_callback(
              	"#(<[^ ][^>]+>)(.*)(?=<[!/a-z])#iU"
              	,create_function('$m','$n=html_entity_decode(str_replace('–','-'$m[2])); return $m[1].htmlentities($n);')
              	,$o
                   );
              
               break;
              default :
              return;
               break;
              }
              ?>
              
                • 26439
                • 104 Posts
                Not too late at all TobyL, this is all about a potential problem that I have peviously cured with "raw" php, having the code you posted is excellent, especially seeing how to adapt code for the ModX enviroment.

                Won’t be developing the site for a month or two, but will let you know how we make out.

                Thanks a million.

                - Richard