Announcement

Collapse
No announcement yet.

My pound (£) symbols don't display correctly

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    My pound (£) symbols don't display correctly

    There are several possible solutions:

    1. Using a .htaccess file.

    If you have a .htaccess file on your site, check to see if the statement 'AddDefaultCharset' exists and if it does change it to: -

    Code:
    AddDefaultCharset Off
    If this does not exist then add it at the top, or you do not have a .htaccess file, then use notepad (or a similar plain text editor) and add the above code at the top and save the file as .htaccess (the 'dot' at the beginning is important.) and upload it to the root of your site, or into the 'acatalog' folder.

    What this does is effectively switch off the character set normally used for the whole server, for the area controlled by the file i.e. in this case your web space as the file is placed in the root of your site, so the scope of it is everything below the root directory.

    See: -

    https://httpd.apache.org/docs/2.4/mo...defaultcharset

    Assuming the charset that the hosting company uses as default on the server is UTF-8 then this will be switched off, allowing the specification at the top of the page to set the charset.

    In theory, as long as the file remains in place and the statement in that file is intact, it should ensure that the pound sign is displayed correctly on every page on your web space.

    2. The problem is that your webserver is using 'Unicode' (UTF) as the default character set, but it should be using ISO. You need to ask your web host to edit the web server config file for your Apache server and change:

    Code:
    AddDefaultCharset UTF8
    to

    Code:
    AddDefaultCharset ISO-8859-1
    3. Place the following in the
    HTML Code:
    <head>
    of your overall layout

    HTML Code:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    4. Altering Special Character Encoding:

    Switch to the 'Design' tab and click on any price shown in the 'Page Preview' pane.
    This should highlight a variable (written in light blue and underlined) in the 'Layout Code' pane called 'TaxInclusivePrice'.
    Double-click this variable to open the variable editor.
    On the row called 'Encoding' click in the white box then select 'HTML' from the drop-down box.
    Click 'OK'. You should see another variable called 'TaxInclusivePriceAlt' which will need the same setting altered.
    Upload the site.

    5. Create a PHP function to replace the pound symbol with the html equivalent and then modifying the price layout to use the new php function.. i.e.:

    insert new function into C:\Program Files\SellerDeck vx*\actinic_main.php:

    Code:
    function priceformat($sFormat, $sPrice, $sPriceAlt)
    {
    echo str_replace("£","£",sprintf($sFormat, $sPrice, $sPriceAlt));
    }
    then modify the "Product Price Including VAT" layout

    Code:
    priceformat("<actinic:variable name="SecondCurrencyFormat" />","<actinic:variable name="TaxInclusivePrice" />", "<actinic:variable name="TaxInclusivePriceAlt" />");


    * Where x is the version of the software being used.
    Last edited by G.W.Green; 14-Jan-2020, 09:55 AM.
Working...
X