- Players can more easily "encrypt" their name, because they do not have to search for fitting specialchars
- Programmers can implement a function to their software, which makes it possible to search for encrypted name. At the moment no one ever finds a map by a search function, if it mainly consists of specialchars. Using str_replace (which supports arrays), you can decrypt it into latin chars. E.g. my nickname "λsκμÑι" which can't be found easily would turn into "askuri", which is what the seeker typed in. Some ideas for realising the backend: use strtolower(), str_replace(), levenshtein(). Right now I do not have a ready to use code snippet or library.
Latin to specialchar table: de- and encrypt stylized names
Latin to specialchar table: de- and encrypt stylized names
I collected all specialchars aining a latin one in a table. This is useful in to ways:
Re: Latin to specialchar table: de- and encrypt stylized names
Example, how to use it in PHP (why didn't I post this before?):
Code: Select all
<?php
// read the table (original is with ; separator, this function expects ,)
$array = array_map('str_getcsv', file('table.csv')); // reads csv into php array
$subject = "ÃĘЯЯ@"; // example input
foreach ($array as $row) { // do the same for every latin char
$latin = array_shift($row); // first one is latin, following are any char we want to replace
$subject = str_ireplace($row, $latin, $subject); // replace them case-insensitively
}
echo $subject;
?>
Who is online
Users browsing this forum: No registered users and 1 guest