Ignore local letters in searches

Broken link? Feature request? Anything related to the Spectrum Computing website here.
Post Reply
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Ignore local letters in searches

Post by RMartins »

Einar Saukas wrote: Sat Mar 17, 2018 4:01 pm
Ast A. Moore wrote: Sat Mar 17, 2018 3:40 pmNeat. Odd that Windows requires a third-party tool for this. Is there really no standard method for printing these? Like holding down a modifier and pressing a letter key?
You can hold ALT while typing the symbol code.
If I remember correctly, it requires a numeric keypad to work.
Laptops, usually do not have one, but they can fake one using the special "FN" key.

So, press ALT + FN and keep pressed, while you input numbers using keys (7,8,9,U,I,O,J,K,L and M).
When you release the ALT key you will get the expected char, if your current font supports it.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Ignore local letters in searches

Post by Ast A. Moore »

RMartins wrote: Sat Mar 17, 2018 4:41 pm
Einar Saukas wrote: Sat Mar 17, 2018 4:01 pm You can hold ALT while typing the symbol code.
If I remember correctly, it requires a numeric keypad to work.
Laptops, usually do not have one, but they can fake one using the special "FN" key.

So, press ALT + FN and keep pressed, while you input numbers using keys (7,8,9,U,I,O,J,K,L and M).
When you release the ALT key you will get the expected char, if your current font supports it.
Yes, that’s how I remember it was on Windows XP. I thought things have progressed since then.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Guesser
Manic Miner
Posts: 639
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Ignore local letters in searches

Post by Guesser »

The so called "alt-codes" are rather limited anyway. iirc there is a way to enter symbols by typing their full unicode codepoint but that's just bonkers compared to a compose key.

Some things are available on modifiers, with a British key layout alt-gr gives acute vowels áéíóúÁÉÍÓÚ, a Euro symbol € on the 4 key, and a broken pipe ¦ on the backtick key, there may be others.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Ignore local letters in searches

Post by Ast A. Moore »

Here’s what you get on macOS. The bottom two images show the symbols you get when you hold down the Option key and the Option and Shift keys, respectively. (The characters highlighted in orange are combination characters—when followed by a suitable letter, they produce a combination: î, ñ, ü, etc.)

Image
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
pavero
Dynamite Dan
Posts: 1570
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: Ignore local letters in searches

Post by pavero »

Here is a PHP function which removes all Czech and Slovak chars from the $string.

function NoCzech($string)
{
$trans = array("á"=>"a", "é"=>"e", "í"=>"i", "ó"=>"o", "ů"=>"u", "ú"=>"u", "ý"=>"y", "ř"=>"r",
"ě"=>"e", "š"=>"s", "č"=>"c", "ž"=>"z", "ť"=>"t", "ď"=>"d", "ň"=>"n", "ľ"=>"l",
"Á"=>"A", "É"=>"E", "Í"=>"I", "Ó"=>"O", "Ů"=>"U", "Ú"=>"U", "Ý"=>"Y", "Ř"=>"r",
"Ě"=>"E", "Š"=>"S", "Č"=>"C", "Ž"=>"Z", "Ť"=>"T", "Ď"=>"D", "Ň"=>"N", "Ľ"=>"L");

return strtr($string, $trans);
}

(utf-8 coding used)
User avatar
Einar Saukas
Bugaboo
Posts: 3070
Joined: Wed Nov 15, 2017 2:48 pm

Re: Ignore local letters in searches

Post by Einar Saukas »

Thanks! But we would need to use a much longer function for all idioms, both in the search tables and the websites.

Instead, I decided to change the database collation of the search columns. Everything seems to be working now. Try searching for "Extrana" or "Extraña", for instance.
User avatar
pavero
Dynamite Dan
Posts: 1570
Joined: Sat Dec 09, 2017 11:49 pm
Location: The Czech Republic
Contact:

Re: Ignore local letters in searches

Post by pavero »

Einar Saukas wrote: Fri Mar 23, 2018 7:27 pm Thanks! But we would need to use a much longer function for all idioms, both in the search tables and the websites.

Instead, I decided to change the database collation of the search columns. Everything seems to be working now. Try searching for "Extrana" or "Extraña", for instance.
yep, it looks as much better solution ...
Ralf
Rick Dangerous
Posts: 2279
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Ignore local letters in searches

Post by Ralf »

Great!

Einar, would you be interested in names of Polish programs, people etc. with original, local Polish letters?
Currently 99% of the names come from WOS which didn't support local letters so they are missing.
User avatar
Einar Saukas
Bugaboo
Posts: 3070
Joined: Wed Nov 15, 2017 2:48 pm

Re: Ignore local letters in searches

Post by Einar Saukas »

Ralf wrote: Fri Mar 23, 2018 8:51 pm Great!

Einar, would you be interested in names of Polish programs, people etc. with original, local Polish letters?
Currently 99% of the names come from WOS which didn't support local letters so they are missing.
Sure!

Now that all searches work properly regardless of accents, there's no reason anymore to remove them.
AndyC
Dynamite Dan
Posts: 1388
Joined: Mon Nov 13, 2017 5:12 am

Re: Ignore local letters in searches

Post by AndyC »

Guesser wrote: Sat Mar 17, 2018 11:03 pm The so called "alt-codes" are rather limited anyway. iirc there is a way to enter symbols by typing their full unicode codepoint but that's just bonkers compared to a compose key.
In a lot of Windows apps, like Wordpad, you can just type the unicode codepoint then hit Alt-X to convert it into the appropriate character but it's not exactly a very useful approach unless you have some kind of awesome memory (or a lookup table, but then you might as well just copy+paste them)
Post Reply