French accented characters in assets folder's name

Hi,

I haven’t found this information in the forums, so I’ll post it here in case it helps someone.

Short version:
After having some issues with images in a big Blocs project, the problems were resolved after renaming without accents the folders containing the originals images.

Details:
My Blocs project is in a folder containing:
• the project file
• an images folder > subfolders for each page of the site* > images used in blocs
• an archive folder
• …

*the french accents were in these folders names.

After hours creating this website, there were ± 20 pages and 100 images (linked in the asset manager but not imported into the blocs project file).
There were some custom classes used to have background images on divs, columns, rows, etc.
At some point, new images could be used as regular blocs backgrounds (via the right column in Blocs interface) but couldn’t be used as custom class backgrounds.
Also, weird things started to happen with newly imported images, showing in the asset manager but being unusable.

I thought it was a Blocs bug and started my project again from scratch, being extra careful with “custom classes hygiene” (not creating too many and trying to optimise their functions across pages).
Then in this fresh and clean project, the same problem occurred with the same images. After the tears came the solution: removing these unloved characters.

All assets were reimported and finally I could deliver the site.

It’s not really that the characters are “unloved” - they just aren’t necessary. Things like folder names, images and other assets only have to be named to allow the page code to access these things. In the world of code, accented characters are simply not used. Of course, the visible content can use accented characters because that is the part that visitors see. Clearly, having, for example, url’s and folder names with accented characters could cause problems for international visitors who may not have the appropriate keyboards to directly type these characters into a URL bar of a browser. So, the general rule is to not use accented characters in anything other visible page content. It is for this reason that domain names themselves do not generally contain accented characters,

1 Like

Speaking as someone that administers just short of 1000 shared hosting webservers, I can tell you that it’s always best to use default characters and avoid any “special” characters like letters with accents (é,è,ë,…). Once you upload it to the webserver it will strongly depend on the charset (character set that has been set as the default one for the server) if the webserver could handle your “special characters”. And most of the times, it’s a big no.

The problem also is that, on shared servers, we have to standardize on one set, as this is a global setting.
If your hosting provider for example would change the character set to fix this for your specific account, chances are rather big that this change would be breaking other sites.

Some other things to avoid:

  • Spaces in filenames (doesn’t work that great in urls, as this will need to be replaced by %20)
  • Very long filenames (most servers have a max length set for filenames. Going beyond that length might result in the server being unable to read/process your file)
  • Special characters (as declared above)
3 Likes