summaryrefslogtreecommitdiff
path: root/django/utils/text.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-09-13 03:28:34 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-09-13 03:28:34 +0000
commit99e0f7a93275b8384085d3b2b397415e2064b4d7 (patch)
treec15c6b2ad78cb54d0eae6291e712ebe401ad9cb5 /django/utils/text.py
parent6e034a831aea204b39f4863eddfbc223a638fb76 (diff)
Removed utils.text.fix_microsoft_characters, which didn't actually do anything. Refs #467.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/text.py')
-rw-r--r--django/utils/text.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/django/utils/text.py b/django/utils/text.py
index d8b2e16e82..3185308064 100644
--- a/django/utils/text.py
+++ b/django/utils/text.py
@@ -40,35 +40,6 @@ def get_valid_filename(s):
s = s.strip().replace(' ', '_')
return re.sub(r'[^-A-Za-z0-9_.]', '', s)
-def fix_microsoft_characters(s):
- """
- Converts Microsoft proprietary characters (e.g. smart quotes, em-dashes)
- to sane characters
- """
- # Sources:
- # http://stsdas.stsci.edu/bps/pythontalk8.html
- # http://www.waider.ie/hacks/workshop/perl/rss-fetch.pl
- # http://www.fourmilab.ch/webtools/demoroniser/
- return s
- s = s.replace('\x91', "'")
- s = s.replace('\x92', "'")
- s = s.replace('\x93', '"')
- s = s.replace('\x94', '"')
- s = s.replace('\xd2', '"')
- s = s.replace('\xd3', '"')
- s = s.replace('\xd5', "'")
- s = s.replace('\xad', '--')
- s = s.replace('\xd0', '--')
- s = s.replace('\xd1', '--')
- s = s.replace('\xe2\x80\x98', "'") # weird single quote (open)
- s = s.replace('\xe2\x80\x99', "'") # weird single quote (close)
- s = s.replace('\xe2\x80\x9c', '"') # weird double quote (open)
- s = s.replace('\xe2\x80\x9d', '"') # weird double quote (close)
- s = s.replace('\xe2\x81\x84', '/')
- s = s.replace('\xe2\x80\xa6', '...')
- s = s.replace('\xe2\x80\x94', '--')
- return s
-
def get_text_list(list_, last_word='or'):
"""
>>> get_text_list(['a', 'b', 'c', 'd'])