Well, they can be used, but may lead to problems later, hence the algorithm dor 
a score’s filename tried to avoid them when generating a default filename from 
the title, and on export parts (and now too in save as and export) for the 
partnames. All these methods now use the same algorithm, so are consistent.

It truns space,  line feed, \, / : *, ?, “, <, > and | into _ and also 
‘trascribes’ umlauts:

 

static QString createDefaultFileName(QString fn)

      {

      //

      // special characters in filenames are a constant source

      // of trouble, this replaces some of them common in german:

      //

      fn = fn.simplified();

      fn = fn.replace(QChar(' '),  "_");

      fn = fn.replace(QChar('\n'), "_");

      fn = fn.replace(QChar(0xe4), "ae");

      fn = fn.replace(QChar(0xf6), "oe");

      fn = fn.replace(QChar(0xfc), "ue");

      fn = fn.replace(QChar(0xdf), "ss");

      fn = fn.replace(QChar(0xc4), "Ae");

      fn = fn.replace(QChar(0xd6), "Oe");

      fn = fn.replace(QChar(0xdc), "Ue");

      fn = fn.replace( QRegExp( "[" + QRegExp::escape( "\\/:*?\"<>|" ) + "]" ), 
"_" ); //FAT/NTFS special chars

      return fn;

      }

 

 

It may need additions for other ‘special’ chararacters, but that is what it 
currently is doing and did since quite a long time for ‘normal filenames’

 

From: Robert Patterson [mailto:[email protected]] 
Sent: Monday, December 22, 2014 1:24 PM
To: [email protected]
Subject: Re: [Mscore-developer] Staff properties, File name

 

Who says umlauts, spaces, and other stuff (e.g., Japanese kanji) are not 
suitable for filenames? Certainly on Win and Mac they are perfectly acceptable 
and commonplace. The characters that are not suitable are characters that 
delimit folders like '/' and '\' and maybe ':', but I am guessing the number of 
such characters is extremely limited and easily enough dealt with in part 
extraction.

 

On Mon, Dec 22, 2014 at 3:25 AM, Joachim Schmitz <[email protected] 
<mailto:[email protected]> > wrote:

True, but those can still contain spaces , umlauts and other fancy stuff not 
suitable for filenames ;-)

 

“Export parts” would convert to ‘proper’ sanitized filenames, same as save does 
for a new score.

 

My PR would just do the same thing on export and save as, when the part is the 
active tab.

 

From: Lasconic [mailto:[email protected] <mailto:[email protected]> ] 
Sent: Monday, December 22, 2014 10:21 AM
To: MuseScore
Subject: Re: [Mscore-developer] Staff properties, File name

 

Hi Olivier,  good to read you.

 

Parts are not always equal to staves. One can create a part with multiple 
staves. The part name can be changed in File -> Parts : "Part Title". I believe 
it will be used as filename.

 

lasconic

 

2014-12-22 10:08 GMT+01:00 Joachim Schmitz <[email protected] 
<mailto:[email protected]> >:

My PR https://github.com/musescore/MuseScore/pull/1568 should fix that. Not
with a customizable name, but with giving a sane default


-----Original Message-----
From: Olivier Lenoir [mailto:[email protected] 
<mailto:[email protected]> ]
Sent: Monday, December 22, 2014 10:06 AM
To: [email protected] 
<mailto:[email protected]> 
Subject: [Mscore-developer] Staff properties, File name

Hi,
In the box Staff Properties, it would be interesting to have a new field for
the file name of the generated parts.
(I don't like spaces and special characters in file names)



----------------------------------------------------------------------------
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from
Actuate! Instantly Supercharge Your Business Reports and Dashboards with
Interactivity, Sharing, Native Excel Exports, App Integration & more Get
technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151 
<http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk> 
&iu=/4140/ostg.clktrk
_______________________________________________
Mscore-developer mailing list
[email protected] 
<mailto:[email protected]> 
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151 
<http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk> 
&iu=/4140/ostg.clktrk
_______________________________________________
Mscore-developer mailing list
[email protected] 
<mailto:[email protected]> 
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151 
<http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk> 
&iu=/4140/ostg.clktrk
_______________________________________________
Mscore-developer mailing list
[email protected] 
<mailto:[email protected]> 
https://lists.sourceforge.net/lists/listinfo/mscore-developer

 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to