GBP pound symbol appearing as uknown char in shop

你。 提交于 2019-12-08 08:57:37

问题


For every occurrence of the pound symbol (£) in my store, I am instead seeing a '?' question mark symbol in a black diamond. Googling has resulted in suggestions of charset - mine is set as utf-8 as below...

<meta http-equiv="content-type" content="text/html;charset=utf-8" />

I believe the store was origonally set up in Os commerce. In the currencies table I have used the ascii code of $pound; instead of the £ symbol but again this seems to have no affect.

Any suggestions would be great

Cheers


回答1:


Can you not replace £ with &amp;pound; (or &amp;amp;pound; in OS commerce)

View to source code of the HTML markup and paste the result - OS commerce could be transforming it server-side which would mean adding the meta tag would be worthless.




回答2:


Try using the HTML entity:

&#163;

Not sure exactly where you're plugging it in, but that should do the trick for most situations if it allows HTML characters like that.




回答3:


The problem with using

&pound; 

or

&#163; 

in osCommerce is that plain text emails won't show the pound symbol and just show the codes above.

A work around is to use GBP or UK Pound in the 'symbol to the left' entry in Admin / Localization / Currencies. But osCommerce won't allow you to put a space after the GBP, to solve this use phpMyAdmin, enter the space after GBP in the table called currencies, in the column called symbol_left.

This gives me: GBP 9.40 in my store listings, and in my plain text emails.

Alternatively for '9.40 Pounds' ,apply the above method to 'symbol to the right' and 'symbol_right' adding a space before the value 'Pounds'




回答4:


We had a similar issue with websites (our own and one from other well established websites) where the pound (£) symbol showed as a letter J. We also noticed that at the same time the text was bold and oblique when it shouldn't have been.

After much investigation it turned out that much of the machines we came across had something wrong with the Helvetica font installed on the machines, and there are two possible solutions:

  1. If you have control over the machines delete the "Helvetica Bold Oblique", "Helvetica Bold" and "Helvetica Oblique" fonts ("Helvetica Regular" seems to work fine).
  2. Use a different font in your applications/websites.



回答5:


You can simply solve this problem by putting following line:

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

between

<head> and </head> tags of your html code.

I recommend it should be placed immediately after <head> tag.

I have tested it and it works.



来源:https://stackoverflow.com/questions/3565801/gbp-pound-symbol-appearing-as-uknown-char-in-shop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!