Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug \nemmo\attachments\Module Line140 pathinfo renturn '' when filename is chinese. #14

Open
hexl opened this issue May 9, 2015 · 8 comments

Comments

@hexl
Copy link

hexl commented May 9, 2015

$file->name = pathinfo($filePath, PATHINFO_FILENAME);

-> $filePath='D:/test/中文文件名测试.jpg'

-> the $file->name is empty.

@CTOlet
Copy link
Owner

CTOlet commented May 9, 2015

Maybe you should use setlocale function?
http://php.net/manual/ru/function.setlocale.php

@hexl
Copy link
Author

hexl commented May 9, 2015

qq 20150510002119

change the code like this?

@hexl hexl closed this as completed May 9, 2015
@hexl hexl reopened this May 9, 2015
@CTOlet
Copy link
Owner

CTOlet commented May 9, 2015

How does it work? Why do you add '_' in chinese?

@hexl
Copy link
Author

hexl commented May 9, 2015

because if without _ the chinese file name will be empty

In Module.php remove is ok

@CTOlet
Copy link
Owner

CTOlet commented May 9, 2015

I understood that it will be empty. I dont understant why?
P.S Your pull request is not correct. You removes the first character every time. But what about the filename, for example, 1.jpg? It will be .jpg, so I think that you are not right.

@hexl
Copy link
Author

hexl commented May 10, 2015

I have another change you can see it in the picture. I just forgot to commit it.
change fiel FileController

@CTOlet CTOlet closed this as completed Jun 19, 2015
@CTOlet CTOlet reopened this Jun 19, 2015
@CTOlet
Copy link
Owner

CTOlet commented Jun 19, 2015

I could not catch that error, closing issue

@CTOlet CTOlet closed this as completed Jun 19, 2015
@CTOlet CTOlet reopened this Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants