CopyQ icon indicating copy to clipboard operation
CopyQ copied to clipboard

INI File Contents - Unwanted Manipulation of Values

Open dbareis opened this issue 8 months ago • 3 comments

I have an INI file that contains the regular expression as a string like:

AutoMatchRE=^.*?\t.*?\t.*?\t(\d{2}[A-Z]{3}\d{4})\t.*?\t.*?\t.*?\t.*?\t(\d{2}[A-Z]{3}\d{4})

I do not wish to escape it. "settings.value()', replaces the "\t" and "\d" tokens. I need to be able to prevent it doing so, I can't see a way, there needs to be one. I have tried with and without enclosing it in double quotes.

dbareis avatar Apr 17 '25 06:04 dbareis

How can I reproduce this?

hluk avatar May 02 '25 12:05 hluk

How can I reproduce this?

Not sure what you mean, it seems to be the way COPYQ works and I'd rather it didn't. Want me to put the above into a small INI?

dbareis avatar May 02 '25 22:05 dbareis

I don't have control over the INI file parser. That is handled by Qt framework.

What I don't understand is why this is a bug. Does CopyQ fail to load the INI file back (i.e. two characters \t are replaced with a single tab character)? Do you store a regular expression, a byte array or a string?

hluk avatar May 03 '25 04:05 hluk

I don't think I can fix it without writing a custom INI parser for the app. That is unlikely to happen.

hluk avatar Jul 26 '25 07:07 hluk