<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Writing Arabic in Fields with English User]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8153&amp;type=atom" />
	<updated>2019-05-18T12:52:40Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8153</id>
		<entry>
			<title type="html"><![CDATA[Re: Writing Arabic in Fields with English User]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34962#p34962" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I found the below in /includes/sessions.inc around line 333</p><div class="codebox"><pre><code>/*
    htmlspecialchars does not support certain encodings.
    ISO-8859-2 fortunately has the same special characters positions as 
    ISO-8859-1, so fix is easy. If any other unsupported encoding is used,
    add workaround here.
*/
function html_specials_encode($str)
{
    return htmlspecialchars($str, ENT_QUOTES, $_SESSION[&#039;language&#039;]-&gt;encoding==&#039;iso-8859-2&#039; ?
         &#039;ISO-8859-1&#039; : $_SESSION[&#039;language&#039;]-&gt;encoding);</code></pre></div><p>I replaced iso-8859-2 with iso-8859-6 and now Arabic works OK.</p><p>I dont know if this is a workaround or it might have some other consequences..It seems OK to me.</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2019-05-18T12:52:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34962#p34962</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Writing Arabic in Fields with English User]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34953#p34953" />
			<content type="html"><![CDATA[<p>Hi,<br />One thing about choosing UTF-8 that works OK with many languages is the PDF files generated when one chooses to use it. An invoice PDF file is 200KB when iso-8859-1 is specified and its 700KB if UTF-8 is used. </p><p>Now I have tried to use iso-8859-6 (Arabic) instead but always got a not supported error in the error log although my system locale has iso-8859-6 installed.</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2019-05-17T20:26:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34953#p34953</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Writing Arabic in Fields with English User]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34946#p34946" />
			<content type="html"><![CDATA[<p>@joe- it&#039;s better we can add this change to core. People can write any language in input field</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2019-05-17T14:46:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34946#p34946</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Writing Arabic in Fields with English User]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34945#p34945" />
			<content type="html"><![CDATA[<p>Great @rafat that worked for me thanks.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2019-05-16T10:05:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34945#p34945</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Writing Arabic in Fields with English User]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34943#p34943" />
			<content type="html"><![CDATA[<p>boxygen,<br /><a href="https://frontaccounting.com/fawiki/index.php?n=Help.InstallUpdateLanugages">this wiki</a><br />contains the guidelines for you to achieve what you want. </p><p>Basically you need to change the encoding to utf-8 of the English language. <br />Heres what ../lang/installed_languages.inc looks like in my case and it works OK for me.<br /></p><div class="codebox"><pre><code>$installed_languages = array (
  0 =&gt; 
  array (
    &#039;code&#039; =&gt; &#039;C&#039;,
    &#039;name&#039; =&gt; &#039;English&#039;,
    &#039;encoding&#039; =&gt; &#039;utf-8&#039;,
  ),
  1 =&gt; 
  array (
    &#039;name&#039; =&gt; &#039;Arabic&#039;,
    &#039;package&#039; =&gt; &#039;ar_EG&#039;,
    &#039;code&#039; =&gt; &#039;ar_EG&#039;,
    &#039;encoding&#039; =&gt; &#039;utf-8&#039;,
    &#039;version&#039; =&gt; &#039;2.4.1-3&#039;,
    &#039;path&#039; =&gt; &#039;lang/ar_EG&#039;,
    &#039;rtl&#039; =&gt; true,
  ),
);

$dflt_lang = &#039;C&#039;;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2019-05-15T20:34:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34943#p34943</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Writing Arabic in Fields with English User]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34942#p34942" />
			<content type="html"><![CDATA[<p>When logged in as a User with Language as English, Writing Arabic in Fields like Customer Name shows ?????????<br />While being logged in as a User with language as Arabic accepts it.</p><p>Even any customer name added in Arabic as an Arabic User shows as ??????? when logged in as English User.</p><p>How can we use Arabic to input some fields while Logged in as Arabic User?</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2019-05-15T19:09:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34942#p34942</id>
		</entry>
</feed>
