Google Answers Logo
View Question
 
Q: What is wrong with my ASCII code? ( No Answer,   4 Comments )
Question  
Subject: What is wrong with my ASCII code?
Category: Computers > Internet
Asked by: sadgrove-ga
List Price: $20.00
Posted: 24 Oct 2005 08:07 PDT
Expires: 23 Nov 2005 07:07 PST
Question ID: 584169
I?d like to know why the code in our ecommerce system gets mangled.
And I?d like to know how to correct it.

I?m not a techie and I didn?t write the code. So I need a simple answer.

A good answer would be: ?You can make this code work properly by
amending it to read??

I?ll now explain the sequence of events.

One our website we have a product with a hyperlink - setprodID(8)

If you click on the link, the software collects the data from a file
called data.js, in which we have this line:

new Array("8","Diploma in Garden Design £495 / $938 plus
postage", "","495.00"),

The software passes the information from data.js to a page called
checkout.html. On that page, the information (above) between the first
set of inverted commas shows up correctly as a description -

Diploma in Garden Design £495 / $938 plus postage

But after the customer has added their contact details and clicks
continue, they get taken to a secure payment page where they are
greeted with scrambled text:

Description  	Diploma in Garden Design £495 / £938 plus postage
Amount  	£495.00

The amount by the way is correct. It?s only the description that shows incorrectly.

Note that in the checkout page the dollar sign gets translated into a
pound sign (We?re based in the UK, by the way).

And when we get a confirmation email, the text says:
 
Description of payment: Diploma in Garden Design Ã?£495 / £938 plus postage
Amount Paid (including postage and packing): GBP495.0
Answer  
There is no answer at this time.

Comments  
Subject: Re: What is wrong with my ASCII code?
From: spooky71-ga on 25 Oct 2005 07:01 PDT
 
Have you checked you specify the correct codepage when delivering web pages?

If you use conventional characters a-zA-Z, numbers and standard
punctation.... everything is always okey as is the same everywhere.
But for special characters like euro symbol, accented and so on....
they are specific for some countries or regions.

When you type you'll always see everything correct. But when you move
the document to another computer, the same number (each symbol is a
number for the computer) could be translated in something else (when
showed) based on the local table.

To overcome this.... you have to specify in the document what codepage
you espect the document to be shown with.

ciao ciao
Subject: Re: What is wrong with my ASCII code?
From: lazortech-ga on 28 Oct 2005 13:22 PDT
 
Hi

put this META tag between your <HEAD> tags

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

then just use a £ as normal

Cheers

Len

www.lazortech.com
Subject: Re: What is wrong with my ASCII code?
From: zorro_paris-ga on 03 Nov 2005 08:45 PST
 
you have to specify the charset on the server side of your script

eg : in ASP : Response.Charset = "windows-1252"

Julien.
Subject: Re: What is wrong with my ASCII code?
From: bloodphoenix-ga on 03 Nov 2005 12:36 PST
 
sadgrove-ga,
It's because you have not set your character set correctly, and is
reading it as a  unrecognized character.

Simply put this in between your <head> </head> tags.

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

Thanks,
Blood Phoenix

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy