<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — UTF-8]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=1702</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1702&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in UTF-8.]]></description>
		<lastBuildDate>Sun, 18 Sep 2016 10:16:12 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: UTF-8]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=26390#p26390</link>
			<description><![CDATA[<p>Hi, I have made mentioned changes above and results are OK for static pages but not for the parts retrewes by Ajax JsHttpRequest.<br />I have modified db_connect file and changed po file to be UTF8 compatible. ages appears with charset=utf8 but ajax shows incorrect characters. Please advise.</p>]]></description>
			<author><![CDATA[null@example.com (trecords)]]></author>
			<pubDate>Sun, 18 Sep 2016 10:16:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=26390#p26390</guid>
		</item>
		<item>
			<title><![CDATA[Re: UTF-8]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=7829#p7829</link>
			<description><![CDATA[<p>I have just the following:</p><p>MySQL my.cnf file [only a line relevant to UTF-8]:<br />[mysqld]<br />default-character-set = utf8</p><br /><p>Slovene language [lang/installed_languages.inc] with:<br />&#039;code&#039; =&gt; &#039;sl_SI&#039;,<br />&#039;name&#039; =&gt; &#039;Slovenš&amp;#269;ina&#039;,<br />&#039;encoding&#039; =&gt; &#039;utf-8&#039;,<br />...</p><br /><p>And, I needed just to slightly modify (only 2 lines are added) one FA file (connect_db.inc):</p><p>==================================================================</p><p>--- includes/db/connect_db.inc.ORIGINAL&nbsp; &nbsp; &nbsp; &nbsp; 2010-12-10 14:12:42.000000000 +0100<br />+++ includes/db/connect_db.inc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2010-12-14 13:40:11.000000000 +0100<br />@@ -25,6 +25,7 @@ function set_global_connection($company=<br /> &nbsp; &nbsp; $connection = $db_connections[$company];</p><p> &nbsp; &nbsp; $db = mysql_connect($connection[&quot;host&quot;], $connection[&quot;dbuser&quot;], $connection[&quot;dbpassword&quot;]);<br />+&nbsp; &nbsp; &nbsp; &nbsp; mysql_set_charset(&#039;utf8&#039;, $db);<br /> &nbsp; &nbsp; &nbsp; &nbsp; mysql_select_db($connection[&quot;dbname&quot;], $db);<br /> &nbsp; &nbsp; return $db;<br /> }<br />@@ -169,6 +170,7 @@ function db_create_db($connection)<br /> {<br /> &nbsp; &nbsp; $db = mysql_connect($connection[&quot;host&quot;] ,<br /> &nbsp; &nbsp; &nbsp; &nbsp; $connection[&quot;dbuser&quot;], $connection[&quot;dbpassword&quot;]);<br />+&nbsp; &nbsp; mysql_set_charset(&#039;utf8&#039;, $db);<br /> &nbsp; &nbsp; if (!mysql_select_db($connection[&quot;dbname&quot;], $db))<br /> &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;CREATE DATABASE &quot; . $connection[&quot;dbname&quot;] . &quot;&quot;;</p><p>==================================================================</p><p>Up to now, everything seems to work OK.</p>]]></description>
			<author><![CDATA[null@example.com (LUTi)]]></author>
			<pubDate>Mon, 27 Dec 2010 13:46:37 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=7829#p7829</guid>
		</item>
		<item>
			<title><![CDATA[UTF-8]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=7550#p7550</link>
			<description><![CDATA[<p>After this modification i have - any date in datebase in any languages.<br />A have in datebase - Rusian, English , Latvia - (&amp;#1040;&amp;#1075;&amp;#1080;.(&amp;#256;&amp;#291;&amp;#299;)) in one string.</p><p>Need Export all tables from mysql and&nbsp; chnage this dump file to UTF-8. <br />Change in dump file where;&nbsp; DEFAULT CHARSET=*** COLLATE=**** &gt;-TO-&gt; DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; </p><p>Make new database with - DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;</p><p>And import file with you date.</p><p>Than install Eny UTF-8 language in FA, Make this dafault. Take language file *.po *.mo from english - convert this files to files with UTF-8 encoding. And put files in you any UTF-8 language in FA.</p><p>Notepad++ work great for convert between encodind.</p><p>Than change down.</p><br /><p> * ..\frontaccount\includes\db\connect_db.inc</p><p>function db_query($sql, $err_msg=null)</p><p>Add like this</p><p>//My change: for UTF-8<br />&nbsp; mysql_query(&quot;SET NAMES &#039;utf8&#039;;&quot;);<br />&nbsp; mysql_query(&quot;SET CHARACTER SET &#039;utf8&#039;;&quot;);<br />&nbsp; mysql_query(&quot;SET SESSION collation_connection = &#039;utf8_general_ci&#039;;&quot;);<br />//My change: for UTF-8</p><p>-----------------<br />&nbsp; &nbsp; * ..\frontaccount\includes\ui\ui_input.inc</p><p>Change <br />//htmlentities(strtr($name, array(&#039;.&#039;=&gt;&#039;=2E&#039;,&#039; &#039;=&gt;&#039;=20&#039;,&#039;=&#039;=&gt;&#039;=3D&#039;,&#039;[&#039;=&gt;&#039;=5B&#039;)))......<br />htmlspecialchars(strtr($name, array(&#039;.&#039;=&gt;&#039;=2E&#039;,&#039; &#039;=&gt;&#039;=20&#039;,&#039;=&#039;=&gt;&#039;=3D&#039;,&#039;[&#039;=&gt;&#039;=5B&#039;))......</p><p>function button($name, $value, $title=false, $icon=false,&nbsp; $aspect=&#039;&#039;)<br />{<br />&nbsp; &nbsp; // php silently changes dots,spaces,&#039;[&#039; and characters 128-159<br />&nbsp; &nbsp; // to underscore in POST names, to maintain compatibility with register_globals<br />&nbsp; &nbsp; $rel = &#039;&#039;;<br />&nbsp; &nbsp; if ($aspect == &#039;selector&#039;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; $rel = &quot; rel=&#039;$value&#039;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; $value = _(&quot;Select&quot;);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; if (user_graphic_links() &amp;&amp; $icon)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($value == _(&quot;Delete&quot;)) // Helper during implementation<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $icon = ICON_DELETE;<br />&nbsp; &nbsp; &nbsp; &nbsp; return &quot;&lt;button type=&#039;submit&#039; class=&#039;editbutton&#039; name=&#039;&quot;.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //htmlentities(strtr($name, array(&#039;.&#039;=&gt;&#039;=2E&#039;,&#039; &#039;=&gt;&#039;=20&#039;,&#039;=&#039;=&gt;&#039;=3D&#039;,&#039;[&#039;=&gt;&#039;=5B&#039;)))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; htmlspecialchars(strtr($name, array(&#039;.&#039;=&gt;&#039;=2E&#039;,&#039; &#039;=&gt;&#039;=20&#039;,&#039;=&#039;=&gt;&#039;=3D&#039;,&#039;[&#039;=&gt;&#039;=5B&#039;)), ENT_COMPAT, $_SESSION[&#039;language&#039;]-&gt;encoding )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&quot;&#039; value=&#039;1&#039;&quot; . ($title ? &quot; title=&#039;$title&#039;&quot;:&quot; title=&#039;$value&#039;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . ($aspect ? &quot; aspect=&#039;$aspect&#039;&quot; : &#039;&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . $rel<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&quot; /&gt;&quot;.set_icon($icon).&quot;\n&quot;;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; return &quot;&lt;input type=&#039;submit&#039; class=&#039;editbutton&#039; name=&#039;&quot;.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //htmlentities(strtr($name, array(&#039;.&#039;=&gt;&#039;=2E&#039;,&#039; &#039;=&gt;&#039;=20&#039;,&#039;=&#039;=&gt;&#039;=3D&#039;,&#039;[&#039;=&gt;&#039;=5B&#039;)))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; htmlspecialchars(strtr($name, array(&#039;.&#039;=&gt;&#039;=2E&#039;,&#039; &#039;=&gt;&#039;=20&#039;,&#039;=&#039;=&gt;&#039;=3D&#039;,&#039;[&#039;=&gt;&#039;=5B&#039;)), ENT_COMPAT, $_SESSION[&#039;language&#039;]-&gt;encoding )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&quot;&#039; value=&#039;$value&#039;&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .($title ? &quot; title=&#039;$title&#039;&quot;:&#039;&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . ($aspect ? &quot; aspect=&#039;$aspect&#039;&quot; : &#039;&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . $rel<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&quot; /&gt;\n&quot;;<br />}</p><p>---------------</p><p>..\frontaccount\inventory\manage\item_units.php</p><p>//MY change:&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; //&nbsp; write_item_unit(htmlentities($selected_id), $_POST[&#039;abbr&#039;], $_POST[&#039;description&#039;], $_POST[&#039;decimals&#039;] );<br />&nbsp; &nbsp; &nbsp; &nbsp; write_item_unit(htmlspecialchars($selected_id), $_POST[&#039;abbr&#039;], $_POST[&#039;description&#039;], $_POST[&#039;decimals&#039;], ENT_COMPAT, $_SESSION[&#039;language&#039;]-&gt;encoding );<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />//MY change:<br />----------------</p><p>May be also need config mysql</p><p>MySQL server my.cnf or Windows my.ini:&nbsp; &nbsp;</p><p>[client]&nbsp; </p><p>default-character-set= utf8&nbsp; &nbsp;</p><p>[mysql] <br />collation_server = utf8_unicode_ci</p><p>character_set_server = utf8</p><p>default-character-set=utf8</p><p>init-connect=&#039;SET collation_connection = utf8_general_ci&#039;</p><p>init-connect=&#039;SET NAMES utf8&#039;</p><p>[mysqld] </p><p>default-character-set=utf8</p>]]></description>
			<author><![CDATA[null@example.com (straga)]]></author>
			<pubDate>Sat, 27 Nov 2010 13:04:44 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=7550#p7550</guid>
		</item>
	</channel>
</rss>
