<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Single, double quotes and other special characters replacements]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=6298</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6298&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Single, double quotes and other special characters replacements.]]></description>
		<lastBuildDate>Mon, 13 Jun 2016 14:52:26 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25624#p25624</link>
			<description><![CDATA[<p>@apmuthu.<br />Please address this to Janusz. I am out of office until June 18.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 13 Jun 2016 14:52:26 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25624#p25624</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25623#p25623</link>
			<description><![CDATA[<p>@joe: what parts need to make it to the core?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 13 Jun 2016 14:12:23 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25623#p25623</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25621#p25621</link>
			<description><![CDATA[<p>Several steps:</p><p>1. Make sure the data in the database is inserted as utf8 so it&#039;ll be readable.<br />In includes/db/connect_db.inc:<br />In function set_global_connection() line #13 before returning $db:<br />+ mysql_set_charset(&quot;utf8&quot;, $db);</p><p>2. In order to get rid of all the HTML entities.<br />In reporting/includes/pdf_report.inc:</p><p>In function Text() line #732 at first line of the fubction:<br />+ $txt = html_entity_decode($txt);</p><p>In function function TextWrap() about line #743, after $str = strtr($str array(&quot;\r&quot;=&gt;&#039;&#039;));<br />+ $str = html_entity_decode($str); </p><p>In function End() about line #953:</p><p>In about line #953:<br />- $mail = new email(str_replace(&quot;,&quot;, &quot;&quot;, $this-&gt;company[&#039;coy_name&#039;]),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;company[&#039;email&#039;]);</p><p>+ $mail = new email(str_replace(&quot;,&quot;, &quot;&quot;, html_entity_decode($this-&gt;company[&#039;coy_name&#039;])),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;company[&#039;email&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />In about line #1036:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p><p>- $sender = $this-&gt;user . &quot;\n&quot; . $this-&gt;company[&#039;coy_name&#039;] . &quot;\n&quot; . $this-&gt;company[&#039;postal_address&#039;] . &quot;\n&quot; . $this-&gt;company[&#039;email&#039;] . &quot;\n&quot; . $this-&gt;company[&#039;phone&#039;];</p><p>+ $sender = html_entity_decode($this-&gt;user) . &quot;\n&quot; . html_entity_decode($this-&gt;company[&#039;coy_name&#039;]) . &quot;\n&quot; . html_entity_decode($this-&gt;company[&#039;postal_address&#039;]) . &quot;\n&quot; . $this-&gt;company[&#039;email&#039;] . &quot;\n&quot; . html_entity_decode($this-&gt;company[&#039;phone&#039;]);</p><p>I hope it&#039;ll help.</p>]]></description>
			<author><![CDATA[null@example.com (HagayM)]]></author>
			<pubDate>Sun, 12 Jun 2016 18:00:03 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25621#p25621</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25615#p25615</link>
			<description><![CDATA[<p>Kindly provide code changes that worked.<br />It may be necessary to make the storage in the tables proper so that they do not get encoded multiple times like &amp; =&gt; &amp; amp; =&gt; &amp; amp;amp; etc.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 12 Jun 2016 17:37:15 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25615#p25615</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25605#p25605</link>
			<description><![CDATA[<p>Thanks. <br />I solved it by alternating some code in pdf_report.inc, using&nbsp; html_entity_decode</p>]]></description>
			<author><![CDATA[null@example.com (HagayM)]]></author>
			<pubDate>Mon, 06 Jun 2016 06:41:03 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25605#p25605</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25604#p25604</link>
			<description><![CDATA[<p>There is some code in FA where Polish characters are spared. Checkout <strong><a href="https://github.com/FrontAccountingERP/FA/blob/master/includes/session.inc#L312">includes/session.inc</a></strong> lines 312-332 in FA 2.3:<br /></p><div class="codebox"><pre><code>function html_cleanup(&amp;$parms)
{
    foreach($parms as $name =&gt; $value) {
//        $value = @html_entity_decode($value, ENT_QUOTES, $_SESSION[&#039;language&#039;]-&gt;encoding);
        if (is_array($value))
            html_cleanup($parms[$name]);
        else
            $parms[$name] = @htmlspecialchars($value, ENT_QUOTES, $_SESSION[&#039;language&#039;]-&gt;encoding==&#039;iso-8859-2&#039; ? &#039;ISO-8859-1&#039; : $_SESSION[&#039;language&#039;]-&gt;encoding);
    }
    reset($parms); // needed for direct key() usage later throughout the sources
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 06 Jun 2016 04:53:56 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25604#p25604</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25602#p25602</link>
			<description><![CDATA[<p>Yes I was afraid that this will be the sole solution.<br />Any available script to do the job?</p>]]></description>
			<author><![CDATA[null@example.com (HagayM)]]></author>
			<pubDate>Sat, 04 Jun 2016 09:05:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25602#p25602</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25601#p25601</link>
			<description><![CDATA[<p>A full list is <a href="http://www.danshort.com/HTMLentities/">here</a>.</p><p>A complete search and replace in the database is in order for such fields.<br />This is a known issue atleast in FA 2.3.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 04 Jun 2016 06:00:48 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25601#p25601</guid>
		</item>
		<item>
			<title><![CDATA[Single, double quotes and other special characters replacements]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25600#p25600</link>
			<description><![CDATA[<p>The way fa insets/updates data in the database is by replacing special characters with their HTML entities equivalents, for example:<br />&amp; will be converted to &amp;<br />&gt; will be converted to &gt;<br />&quot; will be converted to &quot;<br />The problem is that when the data containing these html entities is pulled from the database for reporting, the output pdf file is using these HTML entities and not the original characters. <br />Every single quote is becoming &#039; so for example the item description: a package of 100&#039; hose becomes: package of 100&#039; hose.<br />any ideas hoe this can be solved?<br />I&#039;m using version 2.3.25</p>]]></description>
			<author><![CDATA[null@example.com (HagayM)]]></author>
			<pubDate>Fri, 03 Jun 2016 21:37:13 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25600#p25600</guid>
		</item>
	</channel>
</rss>
