This topic is locked

UK Pound Sign not displaying

8/29/2013 12:16:46 PM
PHPRunner General questions
H
herb200mph author

Server is in U.S. and some field values on input form should allow the UK Pound sign to be entered, either via a UK Keyboard or using the ALT+163 method which shuold give the £ result, followed by some numeric value.
This action purges the data field when saved.
Also, if the £ sign is entered within a paragraph, the net result is also that all text in the field will be purged upon saving.
The best we are able to display is this: ¡ò 1234
Any suggestions on how to allow form fields to accept the UK Pound sign?

C
cgphp 8/29/2013

There is no restriction by default on form fields. Check if a validation routine is performed on server or client side and enable the UTF-8 support.

H
herb200mph author 8/29/2013



There is no restriction by default on form fields. Check if a validation routine is performed on server or client side and enable the UTF-8 support.



Can you please advise how to check that on a WHM/linux server with cPanel.
How is UTF-8 support activated on WHM?

C
cgphp 8/29/2013

Set the localization settings in the Misc tab of PHPrunner: http://xlinesoft.com/phprunner/docs/miscellaneous_settings.htm

H
herb200mph author 8/29/2013



Set the localization settings in the Misc tab of PHPrunner: http://xlinesoft.com/phprunner/docs/miscellaneous_settings.htm



Those settings are set according to the example.
When ALT+0163 is entered, following by a numeric value, and the screen is saved, then returned to list, and then viewed.
The field is completely empty. Nothing. No £, no entered value.
FYI. Any ALT+ character insertion fails also.

C
cgphp 8/29/2013

What is the type of field in the database?

H
herb200mph author 8/29/2013



What is the type of field in the database?



DB TABLE FIELD = varchar

Property is Text Field.

Have tried, none, currency, number, HTML for viewing format.

H
herb200mph author 8/29/2013



DB TABLE FIELD = varchar

Property is Text Field.

Have tried, none, currency, number, HTML for viewing format.



We are able to get the £ symbol to appear in the form "outside" of the datafield, but not within.

C
cgphp 8/29/2013

You should ensure you use the same encoding (UTF-8) everywhere.
What is the encoding used by PHP to talk to MySQL? Check the dbcommon.php file and make sure the encoding is utf-8

What is the encoding of the column in the database?

H
herb200mph author 8/29/2013



You should ensure you use the same encoding (UTF-8) everywhere.
What is the encoding used by PHP to talk to MySQL? Check the dbcommon.php file and make sure the encoding is utf-8

What is the encoding of the column in the database?



Here's what dbcommon shows:
$cCharset = "utf-8";

$cCodepage = 65001;

$cMySQLNames = "utf8";

$gLoadSearchControls = 30
// json support

$useUTF8 = true;
Column in database is:
utf8_general_ci
= = = = =

Should utf8 be utf-8 in this line?
$cMySQLNames = "utf8";

C
cgphp 8/29/2013

Please, check the accept-charset attribute of the form. Are you experimenting the issue with all the browsers?

H
herb200mph author 8/29/2013



Please, check the accept-charset attribute of the form. Are you experimenting the issue with all the browsers?



Where is the "accept-charset" attribute setting located? PHPR, MySQL, PHP?
Yes, failing equally well in all browsers. None of them parse the £ symbol in form field.s

C
cgphp 8/29/2013

Check the source of the html page in the browser.

H
herb200mph author 8/29/2013



Check the source of the html page in the browser.



Here is the source code in the HTML via the browser:
<TR class="runner-row style1"><TD style="WIDTH: 415px; WHITE-SPACE: normal"

class="runner-cc runner-cc1"><DIV class="fieldlabel_4b_i ">

3b-i. How much in total is being raised?

</DIV></TD>

<TD style="WIDTH: 568px; WHITE-SPACE: normal" class="runner-cc alt"><DIV class="fieldvalue_4b_i ">£&nbsp; </DIV></TD></TR>
The £&nbsp; is outside of the actual field value call.
Should that code appear outside of the DIV which is displaying the data?

C
cgphp 8/29/2013

In the source code of the page check the "accept-charset" attribute of the form tag.

H
herb200mph author 8/29/2013



In the source code of the page check the "accept-charset" attribute of the form tag.



Not finding where to do that in Firefox.

C
cgphp 8/29/2013

Right click on the page and choose "View source code".

H
herb200mph author 8/29/2013



Right click on the page and choose "View source code".



That I can do, but what am I looking for and where?

C
cgphp 8/29/2013

Search for "accept-charset". This is an attribute of the form tag.

H
herb200mph author 8/29/2013



Search for "accept-charset". This is an attribute of the form tag.



View Source, search for: accept-charset results in "Praise not found" error.

C
cgphp 8/29/2013

Please, post a demo link of your app?

H
herb200mph author 8/29/2013



Please, post a demo link of your app?



Email me at 200mph@200mphmedia.net and I will send you a log in to access the working side.

H
herb200mph author 8/29/2013



Email me at 200mph@200mphmedia.net and I will send you a log in to access the working side.



Thank you for the offline help.