Page 1 of 2 12 LastLast
Results 1 to 15 of 27

Thread: Polish mod-rewrite url character problem

  1. #1
    Join Date
    Apr 2008
    Posts
    8

    Question Polish mod-rewrite url character problem

    Dody question and how do to make in Polish systemie this coding utf -8?
    I have file: western_char.php


    In this file, there is no Polish characters. Can you write what is the characters?

    Polish characters:
    Code:
    ęóąśłżźćń
    Large:
    Code:
    ĘÓĄŚŁŻŹĆŃ
    in browser like this:
    domain.com/e%99%e3%b3e%85%e5%9b%e5%82%e5%bc%e5%bae%87%e5%84_e %98%e3%93e%84%e5%9a%.html

    Thanks

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Take the example from the other thread and simply copy and paste

    $western_chars['e'] = array('Ę','ę');

    Now do one line for each character and save the file in ANSI code

  3. #3
    Join Date
    Apr 2008
    Posts
    8

    Default

    Quote Originally Posted by Bruceper View Post
    Take the example from the other thread and simply copy and paste

    $western_chars['e'] = array('Ę','ę');

    Now do one line for each character and save the file in ANSI code
    it would be too easy, it does not work in such a way

    charset:
    Code:
    ę
    ist:
    Code:
    %e4%99

    you have any other solution?
    it works super on: http://kulbi.pl

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    That's how it's done, make sure the file AND the characters are saved as ANSI. That's probably what the issue is.

  5. #5
    Join Date
    Apr 2008
    Posts
    8

    Default

    Quote Originally Posted by Bruceper View Post
    That's how it's done, make sure the file AND the characters are saved as ANSI. That's probably what the issue is.
    ANSI is OK.


    Code:
    <?
    $western_chars['a'] = array('Ą','ę');
    $western_chars['s'] = array('Ś','ś');
    $western_chars['z'] = array('ż','Ż','ź','Ź');
    $western_chars['l'] = array('Ł','ł');
    $western_chars['c'] = array('Ć','ć');
    $western_chars['n'] = array('Ń','ń');
    $western_chars['e'] = array('Ę','ę','ę','Ă?');
    ?>

    it's is in ANSI



    Sorry for my English

  6. #6
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    You have unicode/27 and unicode/3F code there, which may be an issue (I don't know, my editor is just telling me it doesn't like the two being mixed up).

  7. #7
    Join Date
    Apr 2008
    Posts
    8

    Question

    Quote Originally Posted by Bruceper View Post
    You have unicode/27 and unicode/3F code there, which may be an issue (I don't know, my editor is just telling me it doesn't like the two being mixed up).
    Code:
    <?
    $western_chars['a'] = array('Ą','ę');
    $western_chars['s'] = array('Ś','ś');
    $western_chars['z'] = array('ż','Ż','ź','Ź');
    $western_chars['l'] = array('Ł','ł');
    $western_chars['c'] = array('Ć','ć');
    $western_chars['n'] = array('Ń','ń');
    $western_chars['e'] = array('Ę','ę');
    
    ?>

    I gave to the previous example that does not work.

    I do not have the time nor the forces already at work on this.
    It can someone from Poland and has already shown the correct links?

  8. #8
    Join Date
    May 2008
    Posts
    3

    Default

    Ok, if any one is still intrested, here is a fix that is working for my Polish directory (it should work for all languages):

    1. Open western_char.php
    Add all required characters
    for example
    Code:
    $western_chars['z'] = array('Ż','ż', 'ź', 'Ź');
    $western_chars['s'] = array('ś','Ś');
    Save it with charset you are using at your directory (you can do it easily with PSPad)
    Otherwise it may not work, I'm using iso-8859-2 and after saving western_char.php as ANSI only few characters were displayed correctly)

    2. Open misc.lib.php
    Find
    Code:
    function SEOReplace($string) {
    Here you will find something like
    Code:
    $string = str_replace(GetWestern('a'), 'a', $string);
    For every character added in western_char.php you have to add line like this here. So like in an example above, we have to add
    Code:
    $string = str_replace(GetWestern('z'), 'z', $string);
    $string = str_replace(GetWestern('s'), 's', $string);
    Next, find
    Code:
    function GetWestern($s)
    Here you have to add elseifs with your characters:
    Code:
        elseif($s=='z') {
          $western = $western_chars['z'];
        } 
        elseif($s=='s') {
          $western = $western_chars['s'];
        }
    I hope it will help somebody

  9. #9
    Join Date
    Dec 2006
    Posts
    103

    Default My version is the file western_char.php

    Quote Originally Posted by Tomasz View Post
    Code:
    <?
    $western_chars['a'] = array('Ą','ę');
    $western_chars['s'] = array('Ś','ś');
    $western_chars['z'] = array('ż','Ż','ź','Ź');
    $western_chars['l'] = array('Ł','ł');
    $western_chars['c'] = array('Ć','ć');
    $western_chars['n'] = array('Ń','ń');
    $western_chars['e'] = array('Ę','ę');
    
    ?>

    I gave to the previous example that does not work.

    I do not have the time nor the forces already at work on this.
    It can someone from Poland and has already shown the correct links?
    Go my acting version of the file western_char.php

    PHP Code:
    <?

    $western_chars
    ['a'] = array('ŕ','Ŕ','á','Á','â','Â','ă','Ă','Ä','ä','ĺ','Ĺ','ą','Ą');//FOR-PL also
    $western_chars['c'] = array('ç','Ç','Ć','ć');//FOR-PL also
    $western_chars['d'] = array('đ','Đ');
    $western_chars['e'] = array('č','Č','é','É','ę','Ę','Ë','ë');//FOR-PL also
    $western_chars['i'] = array('ě','Ě','*','Í','î','Î','Ď','ď');
    $western_chars['l'] = array('ł','Ł');//FOR-PL
    $western_chars['o'] = array('ň','Ň','ó','Ó','ô','Ô','ő','Ő','Ö','ö','ř','Ř');
    $western_chars['s'] = array('ś','Ś');//FOR-PL
    $western_chars['u'] = array('ů','Ů','ú','Ú','ű','Ű','Ü','ü');
    $western_chars['y'] = array('ý','Ý','˙');
    $western_chars['z'] = array('ż','Ż','ź','Ź');//FOR-PL
    //Of course, save the file in UTF-8

    ?>
    Change also requires file misc.lib.php
    Last edited by Bobi; 11-01-2008 at 06:51 AM.
    Best Regards,
    P.S. Sorry for my English.

  10. #10
    Join Date
    Dec 2006
    Posts
    103

    Default

    Quote Originally Posted by Bruceper View Post
    Take the example from the other thread and simply copy and paste

    $western_chars['e'] = array('Ę','ę');

    Now do one line for each character and save the file in ANSI code
    Hellou Bruce.
    Where to make a change in the encoding it has not been shown so:
    tag/krynica-zdr%C3%B3j+imprezy
    only to have the text displayed appearance:
    tag/krynica-zdroj+imprezy
    This concerns the Polish character encoding.
    Files in /lib/western_char.php and misc.lib.php I have done.
    This time I installed the script specifically for the new server with Linux
    Regards Bogdan
    Best Regards,
    P.S. Sorry for my English.

  11. #11
    Join Date
    Jul 2008
    Posts
    117

    Default

    hi bobi,

    please take a look at this thread

    this issue has been solved for indexu deluxe version.

    thanks.

  12. #12
    Join Date
    Sep 2005
    Location
    Poland - Warsaw
    Posts
    342

    Default

    This issue is solved for URL's in links and categories but not for TAGS - but we'll check that.

  13. #13
    Join Date
    Dec 2006
    Posts
    103

    Default

    Quote Originally Posted by maulana View Post
    hi bobi,

    please take a look at this thread

    this issue has been solved for indexu deluxe version.

    thanks.
    You are right is solved for URL's , links and categories.There is no solution to problems in TAGS.
    And I wrote the above files in /lib/ western_char.php and misc.lib.php I have the correct!
    Example:http://www.pirlo.pl/tag/zdj%EAcia+%B6lubne
    I have version INDEXU Deluxe 1.3.1 and the same problem :-((


    I have perhaps a better example of your site:
    http://www.nicecoder.com/demo/indexu/upload/
    Is box called "Popular Tags"
    Please come with mouse on the word for my picture and see what appears on the toolbar? ( http://www.krynica.malopolska.pl/popular.gif )
    Instead, the correct coding "bushes" in this type:
    http://www.nicecoder.com/demo/indexu...%D9%85%D8%AC+%
    Last edited by Bobi; 03-17-2009 at 02:06 PM.
    Best Regards,
    P.S. Sorry for my English.

  14. #14
    Join Date
    Dec 2006
    Posts
    103

    Default

    Quote Originally Posted by linksor.com View Post
    This issue is solved for URL's in links and categories but not for TAGS - but we'll check that.
    Thank you for your support, I would have thought that someone think of the problem.
    Best Regards,
    P.S. Sorry for my English.

  15. #15
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    This issue is solved for URL's in links and categories but not for TAGS - but we'll check that.
    I assumed that when Bobi posted "Thank you for your support" meant this issue was resolved. I almost closed this thread because of what Linksor posted and Bobi said.

    I've asked the programmers to look into the tags issue.

Similar Threads

  1. Mod-rewrite url character problem
    By Morphe in forum INDEXU DELUXE v1.x
    Replies: 15
    Last Post: 06-20-2008, 12:17 PM
  2. Turkish language character problem
    By secero in forum v5.x
    Replies: 0
    Last Post: 02-16-2008, 02:03 PM
  3. RSS character problem
    By TouchIt in forum v5.x
    Replies: 1
    Last Post: 11-03-2007, 12:02 PM
  4. Character Problem
    By uslanmaz in forum Pre-Sales Questions
    Replies: 9
    Last Post: 07-08-2007, 04:01 PM
  5. Special Character problem
    By chm3 in forum v5.x
    Replies: 3
    Last Post: 03-13-2006, 03:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •