<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/fastsearch-encoding-issue.html" />
  <link rel="self" type="application/atom+xml" href="http://forums.movabletype.org/atom.xml" />
  <id>tag:forums.movabletype.org,2011://24/tag:forums.movabletype.org,2009://24.15625-</id>
  <updated>2011-09-01T02:24:24Z</updated>
  <title>Comments for FastSearch encoding issue</title>
  
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.292</generator>
  <entry>
    <id>tag:forums.movabletype.org,2009://24.15625</id>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/fastsearch-encoding-issue.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.movabletype.org/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=24/entry_id=15625" title="FastSearch encoding issue" />
    <published>2009-06-20T08:19:31Z</published>
    <updated>2009-06-23T05:46:28Z</updated>
    <title>FastSearch encoding issue</title>
    <summary>In installs using MySQL 5, I&apos;ve noticed that when adding double quotes to the search term (as per the instructions: to search for an exact phrase, enclose the phrase in quotes), in the search results the double quotes get encoded...</summary>
    <author>
      <name>gulliver</name>
      <uri>http://glvr.com</uri>
    </author>
    
    <category term="Design, Templates, &amp; Tags" />
    
    <content type="html" xml:lang="en" xml:base="http://forums.movabletype.org/">
      <![CDATA[<p>In installs using MySQL 5, I've noticed that when adding double quotes to the search term (as per the instructions: to search for an exact phrase, enclose the phrase in quotes), in the search results the double quotes get encoded to &quot; and display as &quot; rather than ". </p>

<p>As an example: when searching "sample phrase", the result would be:</p>

<p>You searched for... &quot;sample phrase&quot;.</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15625-comment:25343</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15625" type="text/html" href="http://forums.movabletype.org/2009/06/fastsearch-encoding-issue.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/fastsearch-encoding-issue.html#c25343" />
    <title>Comment from gulliver on 2009-06-20</title>
    <author>
        <name>gulliver</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Let's try that again without the garbled code:</p>

<pre>
In installs using MySQL 5, I've noticed that when adding double quotes to the search term (as per the instructions: to search for an exact phrase, enclose the phrase in quotes), in the search results the double quotes get encoded to &amp;quot; and display as &amp;quot; rather than ". 

<p>As an example: when searching "sample phrase", the result would be:</p>

<p>You searched for… &quot;sample phrase&quot;.<br />
</p></pre>]]>
    </content>
    <published>2009-06-20T08:22:17Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15625-comment:25345</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15625" type="text/html" href="http://forums.movabletype.org/2009/06/fastsearch-encoding-issue.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/fastsearch-encoding-issue.html#c25345" />
    <title>Comment from gulliver on 2009-06-20</title>
    <author>
        <name>gulliver</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Damn - third time lucky, perhaps. <br />
And if the preview worked better we wouldn't have this malarkey.</p>

<p>In the returned result, instead of "sample phrase", the double quotes are replaced with ampersand+quot+semicolon.</p>]]>
    </content>
    <published>2009-06-20T08:27:22Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15625-comment:25445</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15625" type="text/html" href="http://forums.movabletype.org/2009/06/fastsearch-encoding-issue.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/fastsearch-encoding-issue.html#c25445" />
    <title>Comment from gulliver on 2009-06-22</title>
    <author>
        <name>gulliver</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>In init.fastsearch.php, replacing</p>

<p>$string = str_replace( '\"', '&quot;', $string );</p>

<p>with</p>

<p>$string = str_replace( '\"', '"', $string );</p>

<p>now returns " rather than &quot; in the results and appears to fix the issue.</p>

<p>With minimal knowledge of this stuff, I'm assuming this is something to do with things being printed rather than evaluated (and vice-versa).</p>]]>
    </content>
    <published>2009-06-23T05:46:28Z</published>
  </entry>

</feed>

