Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOLVED - Problems with russian encoding
#1
When I add file with russian name to DMS, for example,
Quote:Положение о проектной команде.doc
the system cut the first word of this file, so after that i can't open it. And in the properties of file i got information that it is deleted.
Quote:о Проектной Команде.doc
Document deleted
Uploaded by Alexander Kotikov
07/06/2011 11:45
I have no such problems when adding files with english names.

The problem is with basename function
Quote:Attention:
This function is NOT UTF-8 safe.
If the filename starts with an utf8 character, this character will be cut off.
Example:
basename('Übergabe')='bergabe'
Now it is needed to find good solution for this problem. For example, somehow replace basename function, because basename() is locale dependent.
"Whatever you do, work at it with all your heart, as working for the Lord, not for human masters". Kol.3:23
Reply
#2
(06-07-2011, 03:13 PM)kotikov_a Wrote: Now it is needed to find good solution for this problem. For example, somehow replace basename function, because basename() is locale dependent.

The solution is to change basename($userfilename) to ltrim(basename(" ".$userfilename)) at op.AddDocument.php and op.AddFile.php
"Whatever you do, work at it with all your heart, as working for the Lord, not for human masters". Kol.3:23
Reply


Forum Jump:


Users browsing this thread: