Jump to content

Foreign/Swedish characters for web search not working after 5.0 update? [Fixed Alfred 5.0.2 b2071 pre-release]


Recommended Posts

I have a ton of custom web searches for Swedish (and Polish) websites. For some reason, after the recent Alfred update, when I type in any country specific characters (such as å, ä, ö) as my search term, it returns the UTF-8 equivalents instead (obviously ruining my searches).

 

For example, if i search for the word "häst" ("horse"), on my custom Swedish Wikipedia search, it used to return häst, whereas after the update it returns h%C3%A4st.

 

Is there any way I can stop this from happening? Please help.

 

 

Link to comment

Welcome @Myslnik,

 

Those aren’t UTF-8 representations, they are URL encoded. Indeed %C3%A4 is the correct URL encoding for ä. I can’t reproduce an issue, setting up a Swedish Wikipedia search and searching for characters with diacritics is working fine.


Can you share your Custom Search (edit it and click Copy URL for sharing on the bottom left)? Also, what exact versions of Alfred and macOS are you on?

Link to comment

Thanks for this @vitor. i stand corrected, those are not UTF-8 versions (I guess I was looking at the letter ä and its hex. value in this chart?) You're also right about a custom Swedish Wikipedia search working (I gave it as a random example but tested it just now and Swedish letters did work).

 

But my custom Swedish Google page search does not. Here is the Custom Search url i use for this (it includes a double quotes/exact match) :

alfred://customsearch/Google%20Sverige/s/utf8/+/https://www.google.se/search?q=%22%7Bquery%7D%22&hl=sv&le=sv&btnG=Google+Search&num=20&start=0

 

This url used to work before the update to 5.0. What am I doing wrong?

Link to comment

The quotes themselves are special characters which have to be URL encoded. Instead of ", use %22:

 

alfred://customsearch/Google%20Sverige/s/utf8/+/https://www.google.se/search?q=%2522%7Bquery%7D%2522&hl=sv&le=sv&btnG=Google+Search&num=20&start=0

 

Link to comment

Thanks for the tip @vitor! I ended up with this simplified custom search and now it works:

 

alfred://customsearch/Google%20Sverige/s/utf8/+/https://www.google.se/search?q=%2522%7Bquery%7D%2522

 

It's odd though that when validating this search via the Alfred UI (by pressing the "Test" button) it returns the wrong result in Google ("%22häst%22" instead of "häst"). Whereas the opposite happened with the old custom search url (i.e. the validation worked with the Test button but not when using the Alfred search window).

image.thumb.jpeg.9e686cfe94ae68faf9291cbee123051c.jpegimage.thumb.jpeg.7df443c894fc3b8071144291e128b355.jpeg

Edited by Myslnik
Link to comment
  • 3 weeks later...
  • vitor changed the title to Foreign/Swedish characters for web search not working after 5.0 update? [Fixed Alfred 5.0.2 b2071 pre-release]
  • 1 month later...
  • 1 year later...
On 9/28/2022 at 7:40 PM, vitor said:

@Kassi The original URL isn’t properly encoded. It should be https://de.pons.com/übersetzung?q={query}&l=deen&in=&lf=de (encoding the ü).

 

The fix mentioned above was specifically about the validation.

Hey, does Alfred support site:searches like that in my Screenshot? Cause it does not work and I don´t know why.I suspect that Alfred or Google translated the ü one time too many

Bildschirmfoto2023-10-02um19_52_39.png.d9865f6ab95f0bcf6d4f18c64915de88.png

Link to comment
36 minutes ago, DDAlex24 said:

does Alfred support site:searches

 

Yes. There’s nothing special about those, they’re just text: the search engine is what interprets what to do with them.

 

I can’t reproduce your issue at all, it works fine for me. What version of Alfred are you on?

Link to comment
39 minutes ago, vitor said:

 

Yes. There’s nothing special about those, they’re just text: the search engine is what interprets what to do with them.

 

I can’t reproduce your issue at all, it works fine for me. What version of Alfred are you on?

Thanks for the quick reply. I have 5.1.3. (2715). I'm also confused because when I recreate a "simple" Google search myself, it works with "Müller" without any problems. Only if I place "site:tag24" in front of it. I am very perplexed.

Groß (Bildschirmfoto 2023-10-03 um 14.10.24).jpeg

Groß (Bildschirmfoto 2023-10-03 um 14.09.59).jpeg

Link to comment
54 minutes ago, vitor said:

 

 

I can’t reproduce your issue at all, it works fine for me. What version of Alfred are you on?

I know why finally... I use Velja as my default browser, which isn't really a browser, it just selects which URL is used in which browser. If I activate Safari as default Browser, it works! So Velja is the problem...

Edited by DDAlex24
Link to comment
  • 4 weeks later...
4 hours ago, DDAlex24 said:

All of my custom searches work with Müller, but it doesn't work with IMAGO.

 

If it works with every website but one, then the problem is that website. Indeed, searching for müller returns m%FCller in the URL, which is not the correct URL encoding (that would be m%C3%BCller). You can verify this yourself in a URL encoder/decoder.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...