Avatar of miyahira
miyahiraFlag for Peru asked on

Can't open documents (via browser) that their names contain special characters

Hello,

We are are running IIS 6.0 on Windows Server 2003.
The problem is that it's not possible to open via web browser any document (ms-word or pdf or excel) that its name contains spanish special characters (accents). The documents are storage on a virtual directory of the IIS.

For instance, via web browser it's not possible to open this document, because the name of the file contains character "ó":

http://MyServer/MyVirtualDirectory/Documents/Inscripción.doc

When trying to open the file, on the web browser it's displayed: "The page cannot be found"

But it is possible to open this document, which its name has no special character:

http://MyServer/MyVirtualDirectory/Documents/Inscripcion.doc

What kind of setting is missing on the IIS or Windows Server 2003? Has anyone seen this problem before?

Thank you!

Microsoft IIS Web ServerWindows Server 2003

Avatar of undefined
Last Comment
ee_auto

8/22/2022 - Mon
kjanicke

Do you need to put a meta tag somewhere to provide support for special characters?

such as

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

The html code for small letter Ó is &#243;

and your name may actually look something like this in a URL
Inscripci&#37;25C3&#37;25B3n

If this problem is isolated to a single workstation, maybe that workstation cannot translate the characters.

I hope somebody else chimes in with some suggestions.  I used to support a web site with arabic and english so you have peaked my curiosity.

ASKER
miyahira

Thanks for your response, kjanicke, but it's nothing to do with meta tag or workstations. With our former server (WS2003 and IIS6 as well) we had no problem opening doc files with "á", "ó", "é", "í" or "ú"  characters contained in their names. But we have changed server and now we have this problem.

At home, I tried to open  
http://MyServer/MyVirtualDirectory/Documents/Inscripción.doc

and still no success
ASKER
miyahira

Wait... it's possible the thing about meta-tag... I saw this tag on the  html code of the page that tries to open the doc file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<HTML><HEAD><TITLE>The page cannot be found</TITLE>

<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">

As you said, maybe something has to be set up as:

charset=utf-8

Question: Where?


Your help has saved me hundreds of hours of internet surfing.
fblack61
kjanicke

META tags should be placed in the head of the HTML document, between the <HEAD> and </HEAD> tags.  I understoof the HTTP-EQUIV allows you to extend the character set beyond the default.  Netscape would load the character set before displaying the page.
ASKER
miyahira

You've helped me a lot, kjanicke. My question would be where to set up UTF-8 format in the IIS
Praveen DM

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
kjanicke

Greetings:

Have you been able to get your IIS configured to support the extra character set?
ASKER
miyahira

Hello,

Sorry for the late response. I couldn't find any information about configuring UTF-8 format in IIS.

I solved the problem but in this way: Since the path and name of the file to open came from an Oracle database query, I URL encoded the path and name from the query itself. So, if the filename contains any special characters, function utl_url.ESCAPE will deal with it.

SELECT   utl_url.ESCAPE (   '../Documents/' || a.file_name ) AS url_file_name
         FROM     tbl_documents a

Thanks.
ASKER CERTIFIED SOLUTION
ee_auto

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question