Filenames scanned during synchronization should be UTF-8 normalized to the precomposed format using Normalizer. At least when default encoding is utf-8 and PHP 5.3 is available.
Additional information: UTF-8 allows two different ways to encode umlaut special characters like the german ä, ü, ä. For technical background on that see e.g. the following:
I upload images from my Mac to my Linux server via SSH, and some of them contain Umlaut characters. For those files to be imported, I already changed the regex to the following:
Which works fine for files with Umlaut I create directly on the server.
On the Mac, the Umlauts ä are encoded in the decomposed format 0x61cc88. When I upload them, they keep that filename. This is no problem for Linux, the names are displayed just fine. However, PHPs regex parser does not match those decomposed characters with the \pL character group (which it should). So it would be great if those filenames would be normalized before matching.
**Reported by mindhaq on 9 Apr 2015 14:51**
**Version:** 2.7.4
Filenames scanned during synchronization should be UTF-8 normalized to the precomposed format using Normalizer. At least when default encoding is utf-8 and PHP 5.3 is available.
http://us2.php.net/manual/en/class.normalizer.php
**Additional information:** UTF-8 allows two different ways to encode umlaut special characters like the german ä, ü, ä. For technical background on that see e.g. the following:
http://stackoverflow.com/questions/1089966/utf8-filenames-in-php-and-different-unicode-encodings
I upload images from my Mac to my Linux server via SSH, and some of them contain Umlaut characters. For those files to be imported, I already changed the regex to the following:
$conf['sync_chars_regex'] = '/^[\s,.'\pL0-9-_.]+$/u';
Which works fine for files with Umlaut I create directly on the server.
On the Mac, the Umlauts ä are encoded in the decomposed format 0x61cc88. When I upload them, they keep that filename. This is no problem for Linux, the names are displayed just fine. However, PHPs regex parser does not match those decomposed characters with the \pL character group (which it should). So it would be great if those filenames would be normalized before matching.
[Piwigo Bugtracker #3218](http://piwigo.org/bugs/view.php?id=3218)
<!-- github-sync-id:97252345 -->
Is it possible to move $conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.]+$/'; line to configuration file from admin/site_update.php:763? Or at least use some variable from config file?
After each piwigo update I must add my own regex over and over again because this files is always overwritten.
Is it possible to move $conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.]+$/'; line to configuration file from admin/site_update.php:763? Or at least use some variable from config file?
After each piwigo update I must add my own regex over and over again because this files is always overwritten.
<!-- github-comment-id:224675357 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by mindhaq on 9 Apr 2015 14:51
Version: 2.7.4
Filenames scanned during synchronization should be UTF-8 normalized to the precomposed format using Normalizer. At least when default encoding is utf-8 and PHP 5.3 is available.
http://us2.php.net/manual/en/class.normalizer.php
Additional information: UTF-8 allows two different ways to encode umlaut special characters like the german ä, ü, ä. For technical background on that see e.g. the following:
http://stackoverflow.com/questions/1089966/utf8-filenames-in-php-and-different-unicode-encodings
I upload images from my Mac to my Linux server via SSH, and some of them contain Umlaut characters. For those files to be imported, I already changed the regex to the following:
$conf['sync_chars_regex'] = '/^[\s,.'\pL0-9-_.]+$/u';
Which works fine for files with Umlaut I create directly on the server.
On the Mac, the Umlauts ä are encoded in the decomposed format 0x61cc88. When I upload them, they keep that filename. This is no problem for Linux, the names are displayed just fine. However, PHPs regex parser does not match those decomposed characters with the \pL character group (which it should). So it would be great if those filenames would be normalized before matching.
Piwigo Bugtracker #3218
Is it possible to move $conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.]+$/'; line to configuration file from admin/site_update.php:763? Or at least use some variable from config file?
After each piwigo update I must add my own regex over and over again because this files is always overwritten.
@fri-K Did you read http://piwigo.org/doc/doku.php?id=user_documentation:use:features:conf_locale ?
@flop25 It looks like it should work, I'll see on next update. Thanks for the tip :)