Character encoding

As PHP 5 does not have support for Unicode filenames, Web File Share can handle filenames that use one particular encoding. By default, Web File Share is configured to convert the text to UTF-8. This allows the users to upload files with names in any language, containing any non-English character. The filenames will look properly in the browser and the user will be able o manage them. The down-side is that, on some operating systems such as MS Windows, when using FTP or other methods of accessing the files directly in the filesystem, the names might not look as expected. For example, if the user uploads with Web File Share a file named "Iñtërnâtiônàlizætiøn.zip", when accessing the folder by FTP, the file's name will look something like this "IñtërnâtiônÃlizætiøn.zip".

Zip archives


As Web File Share will not alter in any ways the contents of the uploaded files, the filenames inside Zip archives will preserve their natural character encoding. To be able to handle these filenames correctly, Web File Share needs to identify the character set and convert it to UTF-8. In order to achieve this you will need to provide some hints on the probable used encoding. You can define a list of encodings inside the "/path-to-Web File Share/customizables/config.php" configuration file, like this:

$config['app']['encoding']['detect'] = "ASCII, UTF-8, BIG-5, EUC-CN"; //this is an example that should help detect Chinese encodings

You can find here "http://www.php.net/manual/en/function.mb-list-encodings.php" the list of encodings that PHP can currently detect.

Note: Most modern programs are using the latest Zip formats and encode the filenames using UTF-8, so there should be no need for any configuration on Web File Share' side.

 

Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
File indexing and full-text searching
Viewed 2430 times since Wed, Mar 5, 2014
Hiding file types for certain users or groups
Viewed 1264 times since Wed, Mar 5, 2014
Accessing WebDAV
Viewed 1493 times since Wed, Mar 5, 2014
ImageMagick thumbnail generation and image preview
Viewed 1511 times since Wed, Mar 5, 2014
File Encryption
Viewed 1325 times since Wed, Mar 5, 2014
MENU