LetoDMS Community Forum
SOLVED - Problems with russian encoding - Printable Version

+- LetoDMS Community Forum (https://community.letodms.com)
+-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4)
+--- Forum: Bugs/Errors (https://community.letodms.com/forumdisplay.php?fid=11)
+--- Thread: SOLVED - Problems with russian encoding (/showthread.php?tid=342)



SOLVED - Problems with russian encoding - kotikov_a - 06-07-2011

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.


RE: Problems with russian encoding - kotikov_a - 06-07-2011

(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