[Search] Search problem in browse windows

Hello,

I use Anki 23.10.1 on mac.

I’m having a problem with the search function in Browse window.
When I copy a sentence from a PDF document and paste it into the search field, I get no results.
However, when I write the same sentence myself, I get a result.

CleanShot 2023-12-19 at 19.47.35

Is this a bug or should I proceed differently?

Thanks for your help !

Does it work when you hold the Shift key down while you’re doing the paste? In other words, Shift+Command+V. Doing that strips out all formatting, like boldface.

If not, maybe the space before the question mark is a non-breaking space, which is a different character than an ordinary space even though it looks the same. Does it work when you only copy-paste the part before the final space and question mark?

The “Shift+Command+V” command doesn’t work.
I’ve tried pasting only the part before the question mark and it doesn’t change anything.

What happens if you click on Add and paste it into an ordinary field in some random note type, and then click the < > icon at the top right of the the text input field, simply in order to see what the full HTML formatting is for the thing you’re trying to paste. Is there any hidden formatting stuff in there?

Here’s how it looks:

<div>
<div>
<div>
<div>
<div><span style="font-weight: 700;">Quelles sont les propositions exactes à propos d’une papule ?&nbsp;</span></div>
</div>
</div>
</div></div>

The problems I see are:

  • The <div> and <span> HTML tags, which should be stripped out if you hold down the Shift key while pasting, like I mentioned.
  • The &nbsp; HTML entity, which is the non-breaking space I mentioned earlier. Still, it comes after the question mark, so it shouldn’t be a factor.
  • The real problem is that it uses the curly single-quote ’ instead of just plain non-curly apostrophe ', which is what you get when you type on your keyboard. The same thing would apply with curly double-quotes as in “hello” versus plain old non-curly keyboard double-quotes "

Thanks for your analysis.

I can use “SHIFT+Command+V” in the note fields, which removes the formatting, but I can’t use it in the search field.
Nothing happens when I use this key combination.

Hmm. Well, what happens if you go back to basics and just paste with plain old Cmd-V, but then just manually edit that curly single-quote to turn it into a plain apostrophe? Does that work by any chance?

Excuse me, but I don’t think I understand what you mean by single-quote (I speak French and very little English) ?
I’m just copying this text without quote : Quelles sont les propositions exactes à propos d’une papule ?

This can be caused by invisible characters. Try pasting the text to this online tool and see if it helps: View non-printable unicode characters
Invisible characters will be shown in violet.

If that’s the issue, you use another tool like Remove Special Characters - Online Regex Tools | Text-Utils.com to remove the characters. Not an ideal solution, but should work.

2 Likes

Le texte PDF utilise un guillemet-apostrophe, qui n’est pas la même chose qu’une apostrophe dactylographique (ni ouvrant ni fermant).

Voir la différence:

  • d’une
  • d'une

[ Mais attention, dans ce forum, si on écrit d'une avec le clavier, c’est automatiquement converti en guillement-apostrophe — d’une — ce qui pourrait créer un peu de confusion. Pour écrire “d'une” ici avec une apostrophe ordinaire j’ai du utiliser l’entité HTML &#39; ]

4 Likes

Okay, thanks for the clarification.
After testing, it’s indeed a apostrophe problem.

Thanks a lot for your help and for your time, it’s going to help me be much more efficient with Anki.

1 Like

Thanks for your message.
No invisible characters found.
As @sprvlcn thought, it’s an apostrophe problem.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.