Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Join Date
    Apr 2007
    Thanked 5 Times in 5 Posts

    dir() and reading directory with ut8 (special) character

    hy guys. this is hard one

    i'm using dir to read directories form folder. problem is that one of the directories i created under windows is called "početna" (start page).

    now when i read dir where "početna" is located with this code

    PHP Code:
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    $pages_dir "stranice";

    $d dir($pages_dir);

    //echo "Handle: " . $d->handle . "\n";

    //echo "Path: " . $d->path . "\n";

    while (false !== ($entry $d->read())) {
    firefox echoes
    . .. poèetna
    i tried to google for solution, and failed. if anyone had similar problems, and solved it please help.. it's quite complex problem i think..

    now, i'll try to create directory directly with php and then read it, maybe that will solve the problem.

    tnx in advance

    Edit: OK, if i create directory with mkdir() in PHP, director is ANSCII (i think it's ANSCII) created, and has strange chars when i look at it under windows. Going to test it under linux.

    After edit:

    Well problem is now that i need that directory to be a Link, and http protocol is not so friendly for utf8 special characters. Hmmm...
    Last edited by matak; 10-30-2007 at 12:51 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts