<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — mb_convert_encoding(): Illegal character encoding specified]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=4177</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=4177&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in mb_convert_encoding(): Illegal character encoding specified.]]></description>
		<lastBuildDate>Thu, 01 Aug 2013 08:59:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: mb_convert_encoding(): Illegal character encoding specified]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=17195#p17195</link>
			<description><![CDATA[<p>Thanks for info and sorry for the delay.<br />Seems you have something broken in your lang/installed_languages.inc file. Check following things:<br />. $dflt_lang should be set to locale existing in one of $intalled_languages array (&#039;code&#039; element)<br />. every $installed_languages elements should have valid &#039;encoding&#039; value defined;<br />. records in 0_users table should have valid locale values in &#039;language&#039; field.</p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Thu, 01 Aug 2013 08:59:44 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=17195#p17195</guid>
		</item>
		<item>
			<title><![CDATA[Re: mb_convert_encoding(): Illegal character encoding specified]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16952#p16952</link>
			<description><![CDATA[<p>Sure. A few things to point out (more for my curiosity):<br /></p><ul><li><p>Isn&#039;t it too late at line 470? By this time empty parameter is already set in $this-&gt;SCRIPT_ENCODING, and it is $this-&gt;SCRIPT_ENCODING which is an empty parameter that is passed in $fromenc. As my analysis shows in original post, that initial value is wiped out around line 163 (obviously, my analysis may be wrong)</p></li><li><p>The file is huge (~27 thousand lines; 1MB). Hard for me to say what part is significant.</p></li><li><p>I don&#039;t see the way to upload a file here. But you can get it from <a href="http://www.rabinovich.org/.outgoing/bug4177.tar.gz">http://www.rabinovich.org/.outgoing/bug4177.tar.gz</a></p></li></ul>]]></description>
			<author><![CDATA[null@example.com (virshu)]]></author>
			<pubDate>Tue, 02 Jul 2013 21:26:04 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16952#p16952</guid>
		</item>
		<item>
			<title><![CDATA[Re: mb_convert_encoding(): Illegal character encoding specified]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16951#p16951</link>
			<description><![CDATA[<p>Interesting, but I to fix this issue we need to know where the empty parameter is passed from.<br />Could you include following code before line 470 in file JsHttpRequest.php:<br /></p><div class="codebox"><pre><code>        _vl(debug_backtrace());</code></pre></div><p>and cite the call stack stored in tmp/errors.log here?<br />Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Tue, 02 Jul 2013 20:49:28 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16951#p16951</guid>
		</item>
		<item>
			<title><![CDATA[mb_convert_encoding(): Illegal character encoding specified]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16947#p16947</link>
			<description><![CDATA[<p>I am getting the following error in the log in a few places:<br /> </p><div class="codebox"><pre><code>0:admin:JsHttpRequest.php:470: mb_convert_encoding(): Illegal character encoding specified</code></pre></div><p>Looks like the problem is in JsHttpRequest::setEncoding (line 163). When $enc being passed is empty, the default value of $this-&gt;SCRIPT_ENCODING (which is respectable &quot;windows-1251&quot;) is overwritten by an empty string.</p><p>And apparently <a href="http://www.php.net/manual/en/function.mb-convert-encoding.php">mb_convert_encoding</a> doesn&#039;t like an empty string. It&#039;s OK with missing third parameter, but not empty one.</p><p>When I wrapped &quot;parse an encoding&quot; in </p><div class="codebox"><pre><code>if (!empty($enc)) { ... }</code></pre></div><p> block, it seems to be working fine. Obviously, with English-only installation it is difficult to test how it behaves when encoding is actually set, but it works on my machine <img src="https://frontaccounting.com/punbb/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>The way this bug comes to the user - instead of a confirmation &quot;Company was updated successfully&quot; or similar, the user sees an orange warning sign</p>]]></description>
			<author><![CDATA[null@example.com (virshu)]]></author>
			<pubDate>Tue, 02 Jul 2013 20:30:05 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16947#p16947</guid>
		</item>
	</channel>
</rss>
