Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm on Windows 8 chinese version, and I deal with similar problem with this:</p> <pre><code>$filename = iconv("utf-8", "cp936", $filename); </code></pre> <p><code>cp</code> stands for <code>Code page</code> and <code>cp936</code> stands for <a href="http://en.wikipedia.org/wiki/Code_Page_936" rel="nofollow noreferrer">Code page 936</a>, which is the default code page of simplified chinese version of Windows.</p> <p><strike> So I think maybe your problem could be solved in a similar way:</p> <pre><code>$fn2 = iconv("UTF-8","cp1258", $base_dir.$fn); </code></pre> <p>I'm not quite sure whether the default code page of your OS is <code>1258</code> or not, you should check it yourself by opening command prompt and type in command <code>chcp</code>. Then change <code>1258</code> to whatever the command give you. </strike></p> <p><strong>UPDATE</strong></p> <p>It seems that PHP filesystem functions can only handle characters that are in system codepage, according to <a href="https://stackoverflow.com/a/599560/890138">this answer</a>. So you have 2 choices here:</p> <ol> <li><p>Limit the characters in the filename to system codepage - in your case, it's <code>437</code>. But I'm pretty sure that code page 437 does not include all the vietnamese characters.</p></li> <li><p>Change your system codepage to the vietnamese one: <code>1258</code> and convert the filename to <code>cp1258</code>. Then the filesystem functions should work.</p></li> </ol> <p>Both choices are deficient:</p> <p>Choice 1: You can't use vietnamese characters anymore, which is not what you want.</p> <p>Choice 2: You have to change system code page, and filename characters are limited to code page 1258.</p> <p><strong>UPDATE</strong></p> <p>How to change system code page:</p> <p>Go to <code>Control Panel</code> > <code>Region</code> > <code>Administrative</code> > <code>Change system locale</code> and select <code>Vietnamese(Vietnam)</code> in the drop down menu.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload