Hi,

I came across an issue with IMCE during file upload into server(LINUX) with Chinese file name. I uploaded a file with name 新聞稿.pdf.

After upload has been finished, file name was shown wrongly to us only with extension. If same named file is already there then the rename characters is shown accompanied with extension.
Ex: .pdf, _0.pdf, _1.pdf, _2.pdf instead of 新聞稿.pdf, 新聞稿_0.pdf, 新聞稿_1.pdf, 新聞稿_2.pdf

But, If we refresh the page, Then all files has been shown with correct full file names.

See image below:IMCE Issue

Can somebody guide me how to fix this issue.

CommentFileSizeAuthor
#2 imce.page_.inc_.patch2.24 KBmamallana
imce_issue.png55.08 KBpasug

Comments

g.pasupathi created an issue. See original summary.

mamallana’s picture

StatusFileSize
new2.24 KB

Please apply this patch, it will resolve your issue.

Usually PHP's basename() removes all non-US-ASCII characters, so drupal_basename() was added as an alternative.

pasug’s picture

Ah, drupal_basename() works perfect.

mamallana’s picture

Status: Active » Needs review

  • ufku committed 0b60beb on 7.x-1.x
    Issue #2696609 by a.mamallan: Replaced basename() with drupal_basename...
ufku’s picture

Version: 7.x-1.9 » 7.x-1.x-dev
Priority: Critical » Normal
Issue tags: -imce, -issue

Committed, thanks.

ufku’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.