PASTE-IT!

Holding 721M in 51809 pastes. Meet us at #paste-it.net!
Try our Mozilla Jetpack clipboard paster and our Chrome extension!
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#Convert Turkish-specific letters into their closest look-alikes...
#This will create urls that make sense. This dictionary can be extended
#to cover languages other than Turkish.

conversion_table = {u'\u0131' : 'i',
                    u'\u015f' : 's',
                    u'\xf6'   : 'o',
                    u'\xfc'   : 'u',
                    u'\u011f' : 'g',
                    u'\xe7'   : 'c',
                    '\''      : ''}

for k, v in conversion_table.items():
    if k in string:
        string = string.replace(k, v)
turkish patch
by
Firat
pasted
335 day(s) ago
11:30 29-08-2009
in syntax