开发者

Error on file saving

When I create file on Windows hosting, it gets name like джулия.jpg

It has to be a cyrillic name.

fopen() is used开发者_开发百科 for creation.

What can I do with this?


It's an encoding issue. Setting PHP to use UTF-8 encoding will probably suffice: http://php.net/manual/en/function.utf8-encode.php

UTF-8 can represent every character in the Unicode character set, plus it has the special property of being backwards-compatible with ASCII.


  • Check if all the script files use the same encoding (ANSI, ISO-..., UTF-8, etc).
  • Check the internal encoding your script use and the encoding of the string
    • multibyte functions
    • internal encoding of your script
    • encoding of your string
  • NB: Not recommending you to use string input from websites in the filesystem!
    • But if you expect input in a certain format, be sure to specify the content type of your html page.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜