Hello,

I found that the regular expression for mysql in function transliteration_file_query() (line 113) not detect the whitespace symbols in the begin of the filename. So, if filename is " hello.jpg", the regular expression miss this out and file don't be in the list of non-ASCII files. This is true when first symbols is TAB, SPACE and other from whitespace group. I think, transliteration should rename souch files to the form like "_hello.jpg".

So, I offer to change that regular expression from

$regex = '/[a-z0-9_.-]+$';

to the:

$regex = '/^[a-z0-9_.-]+$';

in that case the file " hello.jpg" will be in non-ASCII file list on the page admin/settings/file-system/transliteration

Infortunately, I am not familiar with PostgreSQL, and not sure how to write the regular expressions for this pgsql databases, but suppose there is exactly the same must be for the line 118. Please test for the pgsql.

Comments

andyceo’s picture

Status: Active » Closed (fixed)

Sorry I was wrong. Regular expression works fine.