Accented characters, utf-8, folder and file names

Content is multi-lingual but what about folder and file names?

Content is multi-lingual but what about folder and file names?

It is clearly much better for users if they can see items in their own language.  Throughout Joomla! there are many language translations, and the same applies to jDownloads where new languages are being added.  These language files use what is known as utf-8 encoding to represent each character in the choosen language.  If you would like to know more then a good place to start is http://en.wikipedia.org/wiki/UTF-8

Generally content, and of course the database in Joomla!, support utf-8.  And likewise jDownloads supports this for content and in the database.

Even further jDownloads supports utf-8 in Download names (file names) and in Category names (folders/directories).   This is available in Configuration -  Files And Folders tab

But using utf-8 in  file names and folder names may prove a challenge!  This is not because of jDownloads but because your hosting site may not support utf-8 in its control panel!  Most hosts use a Linux based system.  Intrinsically Linux allows any character in a folder or file name except for '/' and 'null'. If the control panel does not support utf-8 then the file and folder names are unintelligible.  Even worse they may appear visually the same as the original could have included a whole variety of so called illegal characters that have been replaced.  That is the main problem is often the host server file system.  A very common control system for servers is cPanel.  This is not always configured for utf-8.  For example see the link below 
http://kb.siteground.com/how_to_change_the_language_for_cpanel/


If your host site does not support utf-8 in files and folder names then there is another alternative which is also supported by jDownloads.  This is 'Transliteration'.  This is suitable for those languages that basically use accented characters such as French, German and so on. In this case transliteration means that German characters with an umlaut are converted to standard ascii equivalent without the umlaut.  Most European languages and other languages that are fundementally based on Latin characters such as cyrillic are the same in this regard.  For example in French both the e acute and the e grave become e.  The table opposite shows part of the Joomla! transliteration table.

  cyrillic01

The User will see the 'native' name but underneath jDownloads will work on the Latin character equivalent.  Note that jDownloads uses the Joomla! transliteration table which is essentially limited to accented characters based on the Latin characters.

The set up in Configuration - Files and Folder Tab for Transliteration is below

German umlaut example French circumflex example  
transliteration04A transliteration01 transliteration02  
       

User Views

 

Category View in Back End

Category View in Front End

 
transliteration03 transliteration05  

In summary then the main problem is often the host server file system as noted above. Occaisionally it may also be that some internals of Joomla! are not yet utf-8 "friendly", for example
 http://stackoverflow.com/questions/20297160/joomla-utf-8-encoding-fails-on-opening-the-mail

Colin Mercer June 2014

  • Friday, 06 June 2014