Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder low tech's Avatar
    Join Date
    Dec 2009
    Posts
    891
    Thanks
    174
    Thanked 102 Times in 102 Posts

    php setting to recognize filename in Chinese?

    Hi all

    Is there a setting in PHP that I need to uncomment for php to recognize filenames in Chinese?



    I use Chinese on my site with no problem but all my actual file names use English.

    I would like to have file names in Chinese but as soon as I change a filename into chinese and try to open it (via a link) I get

    PHP Code:
    Fatal errorUnknownFailed opening required 'C:/Program Files/xampp/htdocs/ACSE UK/public_html/英國教育制度.php' 


    I have
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    set


    Another quirk is that notepad++ doesn't recognize the filename either and will not open the document.
    It is saved as UTF-8.
    Although notepad++ displays Chinese no problem, it's not keen on the filename in Chinese:-(

    Notepad (normal) has no issue.

    any help appreciated

    LT
    Last edited by low tech; 12-27-2011 at 02:20 PM.
    "The greatest revenge is to accomplish what others say you cannot do."
    ~ Unknown

    I used to be indecisive, but now I'm not so sure.

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Looks like you can't do it in PHP 5.x(though there is a workaround posted). The last comment in the bug report says it will work in PHP 6.

  • Users who have thanked Inigoesdr for this post:

    low tech (12-28-2011)

  • #3
    Regular Coder low tech's Avatar
    Join Date
    Dec 2009
    Posts
    891
    Thanks
    174
    Thanked 102 Times in 102 Posts
    Hi Inigoesdr

    Thank you very much for that info ---- excellent --- i'll look into that.

    I had just written and was about to post hahahahha


    -------------------
    for anyone interested

    update: notepad++
    I save file with chinese filename.

    If I try to open it via right click, EDIT with notepad++ -- it fails.
    If I try to open it via right click, OPEN WITH notepad++ -- it opens.
    If I use the file menu and select the file I just saved --- it opens.
    If I use the file open icon(yellow folder) and select the file --- it opens.

    LT
    "The greatest revenge is to accomplish what others say you cannot do."
    ~ Unknown

    I used to be indecisive, but now I'm not so sure.

  • #4
    Regular Coder low tech's Avatar
    Join Date
    Dec 2009
    Posts
    891
    Thanks
    174
    Thanked 102 Times in 102 Posts
    Hi Inigoesdr

    Just read the link --- that is to do with using fopen right?

    I'm not using fopen. I have a link

    link:
    <li><a href="我的檔案.php">我的檔案</a></li>

    filename:
    我的檔案.php

    when I click the link php scrambles the filename so cannot open the file ---- is it the same issue?

    I'm unsure

    LT
    "The greatest revenge is to accomplish what others say you cannot do."
    ~ Unknown

    I used to be indecisive, but now I'm not so sure.


  •  

    Posting Permissions

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