Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6546739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:44:42+00:00 2026-05-25T11:44:42+00:00

I have been struggling with the UTF-8 charset for quite a while now, and

  • 0

I have been struggling with the UTF-8 charset for quite a while now, and I am still confused about some things.

I have a web page which allow clients to create HTML files and directories on server. The directory name can be in any language. Adiós, días, chapter, level etc. The directories created are later on used as a URL for the HTML files created. Let’s say the user created a directory Adiós and then a file called welcome.html. To view this file, the client clicks a link and for that I get the directory and file name to create a path Adiós/welcome.html. Now I am confused about these things.

  1. When making the directory in php, should I urlencode() every file and directory name?

  2. If I do urlencode the directory name, will the browser be able to open my HTML page? Instead of href="Adiós/welcome.html" it will be href="Adi%C3%B3s/welcome.html".

  3. There’s sometimes an image on my web page which I will src as "Adi%C3%B3s/ing.jpg"; is this going to work?

  4. Should the url in address bar show non‐ASCII characters?

I actually urlencode()d everything but ran into issues as described in point 2 and 3, so I wanted to know what the right approach is for directory naming when working with languages other than English!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:44:42+00:00Added an answer on May 25, 2026 at 11:44 am

    If you save the names urlencoded in the filesystem, you must double urlencode the links and image sources if you want to access them directly, bypassing PHP. Alternatively, you could save the names without any kind of urlencoding, in which case the links would need one pass. However, this last option isn’t available on Windows, where Unicode is not supported in the filesystem functions.

    Alternatively, if you still want to bypass PHP, you can use rewrite rules to reencode the names once they have urldecoded by Apache.

    Finally, you should take note that your approach is dangerous — difficult to get right without security implications. You should consider have a single PHP file serving your pages and saving them in a database. You could still keep pretty filenames by using the PATH_INFO variable. You could also add a caching layer in front of PHP if performance becomes an issue with this solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been struggling with this for a while now. given a set of
I have been struggling to think of some decent uses for things like vectors
I have been struggling with this for quite some time having been accustomed to
I have been struggling with this for a while, so I hope some of
I have been struggling with this for some time now scanning the net for
I have been struggling with the XMLReaderClass in c# for some time now and
I've been struggling with this for quite some time now, although I am pretty
I have been struggling with this problem for a while now, so any help
I have been struggling with this for a while now so I thought I
I have been struggling with encoding problems in MySQL for a while. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.