<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Bug and solution-Chinese character are not stored and displayed proper]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=4530&amp;type=atom" />
	<updated>2013-11-14T08:52:23Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=4530</id>
		<entry>
			<title type="html"><![CDATA[Bug and solution-Chinese character are not stored and displayed proper]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18446#p18446" />
			<content type="html"><![CDATA[<p>Bug and solution report</p><p>problem: <br />===========<br />Chinese character are not stored and displayed properly, <br />in phpmyadmin, the chinese customer name in table &#039;0_crm_persons&#039; are shown as something like &#039;??ä¸æ?&#039;</p><p>Env<br />=============<br />debian 6<br />front account version latest 2.3.19<br />display language:English(no chinese lang pack for this version)<br />mysql 5.5.x db colation utf8<br />mysql 5.5.x db character set utf8<br />php 5.4.X<br />apache 2.2.x</p><p>Solution<br />=================<br />in file includes/db/connect_db.inc<br />add one line<br />mysql_query(&quot;SET NAMES &#039;utf8&#039;&quot;);</p><p>so the code become below<br />====<br />$db = mysql_connect($connection[&quot;host&quot;], $connection[&quot;dbuser&quot;], $connection[&quot;dbpassword&quot;]);<br />&nbsp; &nbsp; <br />mysql_query(&quot;SET NAMES &#039;utf8&#039;&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; mysql_select_db($connection[&quot;dbname&quot;], $db);<br />====</p><p>Solution result: now even in english display and english lang pack, Chinese character are stored and displayed well.(even though the file is coded as asni, not uft-8)</p><p>Some inquiry/suggestion to developers<br />============<br />I remember default mysql store format(colation) for frountaccounting is &#039;latin1&#039;, for the sites not using utf8 as mysql store format(such as latin1), how to put a trigger in frontacc setup/installation so user can choose to store with latin1 or utf8<br />so the code above shall become like mysql_query(&quot;SET NAMES $mysql_char_set&quot;);</p><p>Michael Yu<br />From Singapore<br />email: harmonylife2000@gmail.com</p>]]></content>
			<author>
				<name><![CDATA[micyuh]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18747</uri>
			</author>
			<updated>2013-11-14T08:52:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18446#p18446</id>
		</entry>
</feed>
