UTF-8 not parsing properly - suggestions?

D

Devin

Hi,
I have an asp script that prints out a directors structure. However
there are some french characters in the folder names and they don't
print properly. (they come in as a japanese character, it looks
like).

I have included this html tag:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

I'm thinking the problem lies when the file name is read.

Suggestions?
 
A

Adrienne Boswell

Gazing into my crystal ball I observed Devin <[email protected]>
writing in (e-mail address removed):
Hi,
I have an asp script that prints out a directors structure. However
there are some french characters in the folder names and they don't
print properly. (they come in as a japanese character, it looks
like).

I have included this html tag:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

I'm thinking the problem lies when the file name is read.

Suggestions?

Make sure the server is sending UTF-8 as well, the meta element is
almost useless.
 
D

Devin

Any suggestions about how I would do that? :)- Hide quoted text -

- Show quoted text -

RESOLVED.

Including:
<%@ codepage=65001 %>

At the top of the at the top of the page corrected this.

This might also be necessary:
Response.ContentType = "text/html"
Response.AddHeader "Content-Type", "text/html;charset=UTF-8"
Response.CharSet = "UTF-8"


Thanks!!
D.
 
A

Anthony Jones

Including:
<%@ codepage=65001 %>

At the top of the at the top of the page corrected this.

This might also be necessary:
Response.ContentType = "text/html"
Response.AddHeader "Content-Type", "text/html;charset=UTF-8"
Response.CharSet = "UTF-8"

<<<<<<<<

Since the ContentType and CharSet properties of the response object control
the value of the Content-Type response header there is little point you
attempting to add the header yourself.

If you have static content in the ASP page that is outside of the ASCII
range you should save the ASP page using UTF-8 encoding as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top