Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Polskie Znaki w Plikach By Gilu


radzioneqq

Rekomendowane odpowiedzi

Opublikowano
Instrukcja:
 
Zmieniamy w pliku req.php
całą funkcje "fixSpecialChars"
na to :
function fixSpecialChars($text)
{

$text = str_replace('ł', 'ł', $text);
$text = str_replace('Ł', 'Ł', $text);
$text = str_replace('ą', 'ą', $text);
$text = str_replace('Ą', 'Ą', $text);
$text = str_replace('ę', 'ę', $text);
$text = str_replace('Ę', 'Ę', $text);
$text = str_replace('ć', 'ć', $text);
$text = str_replace('Ć', 'Ć', $text);
$text = str_replace('ś', 'ś', $text);
$text = str_replace('Ś', 'Ś', $text);
$text = str_replace('ż', 'ż', $text);
$text = str_replace('Ż', 'Ż', $text);
$text = str_replace('ź', 'ź', $text);
$text = str_replace('Ź', 'Ź', $text);
$text = str_replace('%40', '@', $text);

return $text;
}
 
Ewentualnie jeśli kożystamy z
innych plików:
 
1.Szukamy takich linijek:
 
$ret[511] .= ";" . urldecode($db_data['user_desc']) . ";";
 
2. Zmieniamy powyższy kod na :
 
$ret[511] .= ";" . fixSpecialChars(urldecode($db_data['user_desc'])) . ";";
 
3. Dodajemy funkcje :
function fixSpecialChars($text)
{

$text = str_replace('ł', 'ł', $text);
$text = str_replace('Ł', 'Ł', $text);
$text = str_replace('ą', 'ą', $text);
$text = str_replace('Ą', 'Ą', $text);
$text = str_replace('ę', 'ę', $text);
$text = str_replace('Ę', 'Ę', $text);
$text = str_replace('ć', 'ć', $text);
$text = str_replace('Ć', 'Ć', $text);
$text = str_replace('ś', 'ś', $text);
$text = str_replace('Ś', 'Ś', $text);
$text = str_replace('ż', 'ż', $text);
$text = str_replace('Ż', 'Ż', $text);
$text = str_replace('ź', 'ź', $text);
$text = str_replace('Ź', 'Ź', $text);
$text = str_replace('%40', '@', $text);

return $text;
}
 

Źródło http://www.mpcforum.pl/topic/1445531-polskie-znaki-w-plikach-shakesfidget/

banner.png

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...