rename french accent because of linux

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: rename french accent because of linux

Re: rename french accent because of linux

by ZvezdanD » Wed May 19, 2010 9:34 am

Preset: Remove diacritical marks from <Into Field> (aeioucdghjklnrstywz)...

Find what: ([\u00E7\u0107-\u010D])|([\u00F0\u010F])|(\u0111)|([\u011D-\u0123])|([\u0125\u0127])|(\u0135)|([\u0137\u0138])|([\u013A-\u0142])|([\u00F1\u0144-\u014B])|([\u0155-\u0159])|([\u015B-\u0161])|([\u0163-\u0167])|([\u00FD\u00FF\u0177])|(\u0175)|([\u017A-\u017E])|([\u00E0-\u00E5\u0101-\u0105\u01CE\u01FB])|([\u00E8-\u00EB\u0113-\u011B])|([\u00EC-\u00EF\u0129-\u012F\u0131\u01D0])|([\u00F2-\u00F6\u00F8\u014D-\u0151\u01A1\u01D2\u01FF])|([\u00F9-\u00FC\u0169-\u0173\u01B0\u01D4-\u01DC])|([\u00E6\u01FD])|(\u0153)

Regular expression 1: checked

Replace with: MapArray(Array("$1", "c", "$2", "d", "$3", "dj", "$4","g", "$5", "h", "$6", "j", "$7", "k", "$8", "l", "$9", "n", "$10","r", "$11", "s", "$12", "t", "$13", "y", "$14", "w", "$15", "z", "$16", "a", "$17", "e", "$18", "i", "$19", "o", "$20", "u", "$21", "ae", "$22", "oe"))

VBScript expression: checked

Re: rename french accent because of linux

by ajkessel » Wed May 19, 2010 8:52 am

Thanks, that regexp find/replace preset seems to do the job perfectly. But shouldn't there be a single preset that takes care of all the diacritics, rather than having to run once on vowels and then a second time on consonants?

Re: rename french accent because of linux

by ZvezdanD » Wed May 19, 2010 3:20 am

The RegExp Find and Replace add-on has predefined presets for removing accents for all Latin-1 and Latin-2 character-sets: "Remove diacritical marks from <Into Field> (aeiou)..." and "Remove diacritical marks from <Into Field> (cdghjklnrstywz)...". If you choose Path as destination field, all accents would be removed in the paths, e.g. č will be replaced with c, and so on.

Re: rename french accent because of linux

by ajkessel » Tue May 18, 2010 6:48 pm

I'm trying to get this to work with other extended characters -- e.g. the czech character č. But when I paste that character into the Const AccentString string in RemoveAccents it doesn't work. There is some sort of unicode problem. I've tried editing the script with gvim for Windows and also with notepad. Any ideas how to extend the script to include these sorts of extended characters, which I believe are not in ASCII at all?

Re: rename french accent because of linux

by and for ... in the filename » Fri Jan 08, 2010 4:40 am

Humm...

With the method by changing the FilenameMappings part of the mediamonkey.ini, somebody if there is a way to replace "..." and ".." in the filename of the song ?

Re: rename french accent because of linux

by nynaevelan » Sat Nov 14, 2009 10:37 pm

The only the other thing I can think of is reboot and then edit the mediamonkey.ini before opening MM.

Re: rename french accent because of linux

by beans » Sat Nov 14, 2009 10:36 pm

Tried this as well to no avail.

Re: rename french accent because of linux

by nynaevelan » Sat Nov 14, 2009 10:14 pm

Double check in the task manager there are no lingering mediamonkey.exe files running.

Re: rename french accent because of linux

by beans » Sat Nov 14, 2009 9:57 pm

Hey, thanks but I am doing it after MM is closed. It's still getting rewritten every time i reopen MM.

Re: rename french accent because of linux

by trixmoto » Fri Nov 13, 2009 4:40 am

You need to make sure that you edit this file with MM closed, as it gets rewritten on exit.

Re: rename french accent because of linux

by beans » Fri Nov 13, 2009 2:54 am

Hi, I've tried this and edited the MediaMonkey.ini file in the C:\Documents and Settings\USER\Local Settings\Application Data\MediaMonkey folder. And after reopening MediaMonkey nothing happens. When I check the .ini file again, it has reverted back to the way it was originally--deleting everything I've added. Any help would be appreciated.

Re: rename french accent because of linux

by kaste » Mon Dec 22, 2008 3:26 pm

very old thread ... I just thought I post my [FilenameMappings] here. That way I keep all tags as they are, but the file names themselves are clean 7 bit ascii, I think.
Cheers, Kai.
21=
22=27
2A=2D
2F=2D
3A=2D
3E=2D
3C=2D
3F=
81=2D
82=2C
83=66
84=2C
85=5F
86=2D
87=2D
88=5E
89=5F
8A=5F
8B=5F
8C=5F
8D=5F
8E=5A
8F=5F
90=5F
91=27
92=27
93=27
94=27
95=2D
96=2D
97=2D
98=7E
99=2D
9A=2D
9B=2D
9C=2D
9D=2D
9E=7A
9F=59
A0=20
A1=5F
A2=5F
A3=5F
A4=5F
A5=5F
A6=5F
A7=5F
A8=5F
A9=5F
AA=5F
AB=5F
AC=5F
AD=2D
AE=5F
AF=2D
B0=5F
B1=5F
B2=32
B3=33
B4=27
B5=5F
B6=5F
B7=5F
B8=5F
B9=5F
BA=5F
BB=5F
BC=5F
BD=5F
BE=5F
BF=
C0=41
C1=41
C2=41
C3=41
C4=41
C5=41
C6=41
C7=43
C8=45
C9=45
CA=45
CB=45
CC=49
CD=49
CE=49
CF=49
D0=44
D1=4E
D2=4F
D3=4F
D4=4F
D5=4F
D6=4F
D7=2D
D8=2D
D9=55
DA=55
DB=55
DC=55
DD=59
DE=2D
DF=73
E0=61
E1=61
E2=61
E3=61
E4=61
E5=61
E6=61
E7=63
E8=65
E9=65
EA=65
EB=65
EC=69
ED=69
EE=69
EF=69
F0=2D
F1=6E
F2=6F
F3=6F
F4=6F
F5=6F
F6=6F
F7=2D
F8=2D
F9=75
FA=75
FB=75
FC=75
FD=79
FE=2D
FF=79

by kiko26 » Sun Oct 29, 2006 10:02 am

Hello, i just finished the rename of my collection using the last script given by Steegy.

i have had few problem but now it's ok.
i want to thank you all for your job and your time.

now all my mp3 filename don't have french accent and space, for my linux server it's very fine.

many thanks.
bye

by Steegy » Sat Oct 28, 2006 11:54 am

Code: Select all

Sub NormalizeFilename
  Dim list, itm, i, tmp, res, qty, message 

  Set list = SDB.CurrentSongList 

  res = SDB.MessageBox( "About to (possibly) modify " + CStr(list.count) + " files. Continue?", mtConfirmation, Array(mbOk, mbCancel)) 

  if res = mrOK then 
    For i=0 To list.count-1 
      Set itm = list.Item(i) 
      tmp = itm.Path

      tmp = Replace(tmp, " ", "_") 
      tmp = Replace(tmp, "´", "'") 
      tmp = Replace(tmp, "`", "'") 

      tmp = Replace(tmp, " ", "_") 
      tmp = Replace(tmp, " - ", "-") 

      tmp = RemoveAccents(tmp)

      itm.Path = tmp 
      itm.UpdateDB 
    Next 
  End If 
End Sub 


Function RemoveAccents(InputString) 
    Const AccentString = "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÏÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóóôõöùúûüýÿ" 
    Const NonAccentStr = "AAAAAACEEEEIIIIINOOOOOUUUUYaaaaaaceeeeIIIIonoooooouuuuyy" 

    RemoveAccents = InputString 

    Dim i 
    For i = 1 To Len(AccentString) 
        RemoveAccents = Replace(RemoveAccents, Mid(AccentString, i, 1), Mid(NonAccentStr, i, 1)) 
    Next 
End Function
Just a quick mod of the script that Bex linked. I emphasize "quick" because I don't have much time and didn't test it.

Cheers
Steegy

by Bex » Sat Oct 28, 2006 11:40 am

Yes, do what Steegy says!

If not, I actually found a script which adds underscore to the path:
http://www.mediamonkey.com/forum/viewtopic.php?t=10172
Perhaps you can alter it so it fit your needs...

Top