Help: where is MeteorJS converting foreign characters in file names

Hi,

Files in the “private” folder will be checked for foreign characters when MeteorJS is running.

An example of such would be the German Umlaute like ä, ü, ö but also ß

They are replaced with an underscore letter in the file name like:

Original: Joachim_Göttel.zip

In MeteorJS: Joachim_G_ttel.zip

Can someone point me to the code where this is happening in MeteorJS? I was trying to convert the file names but every normalization function has failed so far.

Thanks in advance!

I don’t really get the question. You’re saying that Meteor (by default) rename your files in private folder? Or you’re asking to make it happen?

MeteorJS does it automatically. If you check .meteor/local/build/programs/server/assets/app/ this is the folder where files from private are moved to and being renamed in case a foreign character(s) is used.

Thanks,

Andreas

I have no idea, but I guess it’s somewhere in Meteor tools.

@gabsferreira who on the team can help here?

Hi @a4xrbj1 ,
I think this explains the matter: Load `program.json` using the Unicode Normalization Form of the loaded JSON string by hwillson · Pull Request #7963 · meteor/meteor · GitHub

Thanks Paul,

this is going in the right direction however the solution posted in that thread still doesn’t produce the same results for me if I use the code:

filename.normalize(‘NFC’).replace(/[^a-zA-Z0-9._:-]/g, ‘’);

Original: 37_J_Göttel

Meteor: 37_J_Go_ttel

Normalize code: 37_J_Gttel