IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> \\ problem
chrisjj
post Feb 25 2012, 00:30
Post #1


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



How can I prevent Mp3tag messing with \\ in fields?

If on V2.49 I edit a field containing "\\", Mp3tag changes what I see to ", ".

I guess the program thought I wanted multiple values. But even then, it messes up - if I edit again, it concatenates the multiple values with ", " into a single value

I want it to keep my value intact regardless.

This post has been edited by chrisjj: Feb 25 2012, 16:33
Go to the top of the page
 
+Quote Post
DetlevD
post Feb 25 2012, 08:39
Post #2


Member


Group: Full Members
Posts: 4787
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (chrisjj @ Feb 25 2012, 00:30) *
How can I prevent Mp3tag messing with \\ in fields?
If one V2.49 I edit a field containing "\\", Mp3tag changes what I see to ", ".
I guess the program thought I wanted multiple values.
But even then, it messes up - if I edit again, it concatenates the multiple values with ", " into a single value
I want it to keep my value intact regardless.

chrisjj, at first I recommend reading this thread ...
http://forums.mp3tag.de/index.php?showtopic=13320
... then come back and we may discuss the "\\ double backslash problem" resp. the "built in multi-value functionality" from another point of view.

DD.20120225.0841.CET


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
chrisjj
post Feb 25 2012, 12:56
Post #3


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



Thanks Detlev, but that topic tells me nothing I don't already know. And what I seek is a solution not a discussion.
Go to the top of the page
 
+Quote Post
pone
post Feb 25 2012, 13:27
Post #4


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



I don't understand the problem fully.

Do you want to use "\\" as literal characters?
Where do you see "\\" displayed as ", "? At the main window, in the tag panel, in the extended tags dialog, or in an external application?
Go to the top of the page
 
+Quote Post
chrisjj
post Feb 25 2012, 17:42
Post #5


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



> I don't understand the problem fully.

Simply load a track having \\ in a field e.g. and edit it in the main window. You'll see it change to ", ".

e.g.

Click the Description field, press RETURN. See:


> Do you want to use "\\" as literal characters?

I am using them as literal characters, entered using another app. I want Mp3tag just not to mess that up.

> Where do you see "\\" displayed as ", "? At the main window

Yes.

This post has been edited by chrisjj: Feb 25 2012, 17:43
Go to the top of the page
 
+Quote Post
pone
post Feb 25 2012, 18:51
Post #6


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



That's a bit of a problem. Mp3tag is using "\\" as a syntax character which tells the programm to split the tag field. As far as I know, there is no proper way to escape that syntax function of "\\".

There are a few workarounds:
Mp3tag only splits the fields in these cases:
- if the field is displayed at the the tag panel and you save the file
- if you open the extended tag panel and leave it with pressing "OK"
- if you click into the field at the main window
(for the first two cases, the fields are only splitted when all selected files have the same values)
If you can avoid those cases, you are fine.

If not, you can make an action to reverse the splitting:

Action: Merge dublicate fields
Field: DESCRIPTION
Seperator String: \\


Or you can do an regex replace action, to insert a zero width space between the the two characters. With this trick, the field looks like before, but it isn't splitted because there is an invisible character between the two "\\". But if you use that description field to be read by another application, there could be problems that the filepath you are storing there isn't recognized any more.

Action: Replace with regular expression
Field: DESCRIPTION
Regular expression: \\\\
Replace matches with: \\\x{200B}\\


You have to do this before the fields are splitted. If you want to do it afterwards, merge the fields again an join that with using that zero width space, use:

Action: Format Value
Field: DESCRIPTION
Formatstring: $regexp($meta_sep(description,\\),\\\\,\\\x{200B}\\)
Go to the top of the page
 
+Quote Post
chrisjj
post Feb 25 2012, 19:05
Post #7


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



> If you can avoid those cases, you are fine.

The problem occurs when editing the field. You're suggesting avoiding all cases that edit the field, right?.

> If not, you can make an action to reverse the splitting:
> Action: Merge dublicate fields

That messes-up fields that weren't split by the first mess-up.

> Or you can do an regex replace action, to insert a zero width space ... But if you use that
> description field to be read by another application, there could be problems

Yes it will totally break the external use.

Thanks for the suggestions.

This post has been edited by chrisjj: Feb 25 2012, 20:54
Go to the top of the page
 
+Quote Post
pone
post Feb 25 2012, 19:14
Post #8


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



>The problem occurs when editing the field. You're suggesting avoiding all cases that edit the field, right?.

Yes. whenever you edit a field with "\\" in Mp3tag it gets splitted. But you can edit other fields in the same file.


>That messes-up field that weren't split by the first mess-up.

No, if fields aren't splitted, they don't get changed by the "Merge dublicate fields" action.
Go to the top of the page
 
+Quote Post
chrisjj
post Feb 25 2012, 20:55
Post #9


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



QUOTE (pone @ Feb 25 2012, 18:14) *
>The problem occurs when editing the field. You're suggesting avoiding all cases that edit the field, right?.

Yes. whenever you edit a field with "\\" in Mp3tag it gets splitted.


OK, thanks. I'll suggest this be fixed.


QUOTE (pone @ Feb 25 2012, 18:14) *
>That messes-up field that weren't split by the first mess-up.

No, if fields aren't splitted, they don't get changed by the "Merge dublicate fields" action.

I meant it messes up /split/ fields that weren't split by the first mess-up. Sorry to be imprecise.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd July 2014 - 04:41