rejetto forum

Translite filename

0 Members and 1 Guest are viewing this topic.

Offline artem78

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
Some files on my server contains non ascii (cyrillic) symbols in name. How can I create a macros to transliterate it when downloading? Maybe it possible to add header "Content-Disposition: attachment; filename=NewFileName"?


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 911
  • I'm only trying to help i mean no offense.
    • View Profile
HFS the program itself can't handle some of the file names. if the file name has non utf-8 characters in it, HFS will be unable to send the file
there have been many users having issues, it a know bug/problem that doesn't have an easy or viable solution.

Meaning you have to use file names that contain alpha number numbers "a-z" 0-1"... :(

BUT, you can try with other html conventional means that change the language and encoding type:

Example:
http://www.w3.org/International/questions/qa-html-encoding-declarations.en

Code: [Select]
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>


Since you are using ascii, you can try it, but there is no guarantee:
http://winrus.com/cpage_e.htm
http://winrus.com/mix_e.htm
http://www.w3schools.com/charsets/

I would recommend this for you:
Code: [Select]
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-8">


Here is a helpful site that can help translate/encode for possible html support via meta tags:
(you would have to copy and paste it over back and forth manually ... :(
http://mashke.org/Conv/

good luck
With the move to hfs 3.0 and github. I'm using Unraid and HFS 3 as a docker. Any File Mentioned is now removed from my google drive.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
it can be done: access the "events" and add one called [download name] as reported in the documentation
http://www.rejetto.com/wiki/index.php?title=HFS:_Event_scripts

if you do something like this
[download name]
(%item-name%)


you should get all files surrounded with parenthesis, for example.
Now you also need the command to replace characters, and it's {.replace.}
see documentation http://www.rejetto.com/wiki/index.php?title=HFS:_scripting_commands#Data_manipulation