ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - UTF-8, ANSI Coding.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UTF-8, ANSI Coding.

 Post Reply Post Reply Page  12>
Author
Message
JWL View Drop Down
Senior Member
Senior Member


Joined: 15-August-2008
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote JWL Quote  Post ReplyReply Direct Link To This Post Topic: UTF-8, ANSI Coding.
    Posted: 08-September-2008 at 9:31am
The .asp pages seem to be coded with ANSI, which causes (tm) and (r) signs to not display when the browser is using the more common a UTF-8 character mode.

I have tried converting the asp pages to UTF-8 using notepad, and the results are like 50/50.  Now when the browser both IE7 and FF3 are in UTF-8 mode, they display the (tm) and (r) like 50% of the time, the other half it's the invalid sign in place of these symbols.

How, can I convert these pages to UTF-8, so they function 100% when browser is set to UTF-8.
Back to Top
Matt View Drop Down
Moderator Group
Moderator Group


Joined: 20-July-2006
Location: United States
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post Posted: 08-September-2008 at 10:24am
You can add this to the <head> section of your HTML:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 08-September-2008 at 10:38am
I ran into this exact problem on http://www.euphoriababy.com, but besides what JWL mentions, it also treats spaces, line breaks and such to be presented as little boxes. 
 
The client has discovered that if she over-types spaces and line breaks in order to resolve these characters (using the built-in HTML editor), then goes back later and edits the product without touching the description, the little boxes appear again.  Very frustrating. (And I do have the UTF-8 statement present in the header.)


Edited by Greg Dinger - 08-September-2008 at 10:46am
Back to Top
macleather View Drop Down
Newbie
Newbie


Joined: 23-June-2008
Location: Los Angeles
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote macleather Quote  Post ReplyReply Direct Link To This Post Posted: 08-September-2008 at 6:00pm
I'm experiencing a similar problem. If I use &frac12; in order to get 1/2 all is fine until I edit the product again at which time I get an A with a circle above it instead of the 1/2 even though the actual 1/2 shows in the description before I save the changes. This happens with all of the & codes except &quote; I also get the A with circle for spaces either typed or &nbsp; as Greg indicates. I do not have the UTF-8 statement in my header.

Alan
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 08-September-2008 at 6:04pm
Alan, could you throw that UTF-8 statement into the header so we can determine if that resolves the issue or begins to reveal a wider pattern please?
Back to Top
macleather View Drop Down
Newbie
Newbie


Joined: 23-June-2008
Location: Los Angeles
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote macleather Quote  Post ReplyReply Direct Link To This Post Posted: 08-September-2008 at 6:35pm
Greg, I put the UTF-8 statement into my header and it seems to have solved my problem. I edited a couple of items with the problems and they stuck. In other words, it held the values once input. Since I'm not a programmer and don't understand the UTF-8 etc, I copied it from Matt's example and placed in at the first line after the opening Head tag in header.asp

Alan
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 08-September-2008 at 6:48pm
Excellent.  Thanks.
 
FYI:
Back to Top
JWL View Drop Down
Senior Member
Senior Member


Joined: 15-August-2008
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote JWL Quote  Post ReplyReply Direct Link To This Post Posted: 09-September-2008 at 6:56am
Originally posted by Matt Matt wrote:

You can add this to the <head> section of your HTML:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


I put that in the header, before I even created this thread, and it didn't work for me.  Although, I was hoping it would.  And Greg is right about the spaces, same here - they have a little box as well.

Like I said... before I converted these .asp pages to UTF-8 - I always got the invalid symbol in place of (tm) (r) etc.  But, now that I have converted like the configureprd.asp, viewprd.asp etc pages to UTF-8 - when the browser is set to UTF-8 in both IE7 and FF3, the (tm) (rm) 'spaces' etc display properly - but only like 50% of the time, the other half I still get the invalid symbol.  Even, after putting that meta tag in the header file.

It's weird... I wonder if I need to convert every .asp include that these pages pull in - to UTF-8 as well, like the header.asp, footer.asp etc.


Edited by JWL - 09-September-2008 at 6:59am
Back to Top
JWL View Drop Down
Senior Member
Senior Member


Joined: 15-August-2008
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote JWL Quote  Post ReplyReply Direct Link To This Post Posted: 09-September-2008 at 7:11am
I see that you have this in the adminheader.asp file:

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

I don't understand why you encoded all the .asp pages in ISO-8859-1 or ANSI which is closely related.  You should have used a unicode, shame on you.  :P

Anyway, I know how I could solve the problem - I've never had this problem before and I know why... we always use "&reg;" and "&#153;" for (tm) and (r) symbols but when we input those in the admin panel, when we save the product info, it converts them to the displayed symbols... if I changed the charset in the adminheader to UTF-8, would it keep the original code of these symbols instead of converting them?

Edit: I've been told that I need to convert all the .asp file includes like header.asp, footer.asp etc to UTF-8 and that's why the characters don't always display properly even though the main pages are encoded in UTF-8.  Any thoughts?

Thanks.




Edited by JWL - 09-September-2008 at 11:56am
Back to Top
Matt View Drop Down
Moderator Group
Moderator Group


Joined: 20-July-2006
Location: United States
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post Posted: 09-September-2008 at 9:40pm
You do not need to re-encode the files. There are stores using Western, Hebrew, Chinese, etc...  They all rely on the correct meta data for the type of characters they are displaying.

The symbols you need can be created with ISO-8859.

http://htmlhelp.com/reference/charset/iso160-191.html

Using the original files add the following tag to your <head> section:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

If you were using the characters from the UTF-8 character set then your UTF-8 meta tag would have worked. So I suspect you just need ISO-8859.  This works on our demo store.

If you want to preserve special characters then type them directly into the text box, instead of into the HTML editor.

We hope this helps.
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.094 seconds.