Have a look at the PHP function urlencode(), that will hopefully help.
Also, in the latest update of WordPress (3.3.1) they have fixed it so that permalinks (post slugs) no longer contain special characters. This of course doesn’t help with your already existing slugs, but I’m sure there are ways and means of cleaning that field in your database.
Related Posts:
- Is ‘# -*- coding: utf-8 -*-‘ also a comment in Python?
- What is the difference between UTF-8 and Unicode?
- Byte and char conversion in Java
- What is “=C2=A0” in MIME encoded, quoted-printable text?
- Strange characters – despite everything being UTF-8
- One for the gurus: upgrade to 3.x messed up only filenames with accented chars
- Word press replacing unicode characters with “?”s
- How to set charset for wp_remote_post request?
- Outputting post title without encoding
- Apostrophes showing up as ΓÇÖ after converting from Windows to Linux
- WordPress content shows this character ​​
- Symbols such as £ end up being  in the database
- Fix encoding ’ [closed]
- Getting Non-printable characters were found while entering Euro Symbol
- How to deal with apostrophes
- Question mark on special chars
- Encoding Issue while using French in WordPress
- Get ?? for unicode characters
- WordPress theme character encoding issue
- character encoding problem in custom template
- restored old database now some characters have changed?
- WordPress plugin problem with encoding
- Post removes any text from post that’s following special characters
- WordPress Dashboard Characters Messed Up
- How to make sure the letters ‘pez’ do not convert to a fish symbol? [closed]
- Problem some Persian texts show in ISO-8859-5
- HTML encoding issues – “” character showing up instead of ” “
- What character encoding is >?
- How to replace � in a string
- Does “\d” in regex mean a digit?
- What is base 64 encoding used for?
- Python – Reading and writing csv files with utf-8 encoding
- Where does this come from: -*- coding: utf-8 -*-
- python encoding utf-8
- The origin on why ‘%20’ is used as a space in URLs
- I have a string with “\u00a0”, and I need to replace it with “” str_replace fails
- “Unmappable character for encoding UTF-8” error
- URL Encoding Issue %3D instead of (=)
- Python decoding Unicode is not supported
- C# Encoding a text string with line breaks
- Encode text string being appended as query to URL [closed]
- How to stop WordPress using utf8mb4_unicode_520_ci collation?
- Add whitespace between Chinese and other letters
- How can I stop TinyMCE from converting my HTML entities to characters?
- Why WP encodes UNICODE (UTF8) containing urls? Any drawbacks of UNICODE url?
- Non-Latin Characters in permalinks
- Faulty restore of the database, encoding issue
- Remove “Category Archives: title” at the top of a category page [duplicate]
- How to encode post content as JSON?
- How to write Hebrew characters?
- What is WordPress file encoding?
- How to diagnose and keep in check encoding issues?
- add_rewrite_rule not working for language specific characters
- Query string becomes encoded when a static page is used as homepage
- Text cut off after the character 𪇆 in TinyMCE
- Emojis getting converted to “?”
- How do I change database charset when using `wpdb`
- urlencode query string in gravity forms confirmation redirect
- TinyMCE as comment editor – encoding issues
- How to get my post title to work with an apostrophe (‘s)?
- Non latin post slug truncate
- Is sanitize_title_with_dashes formatting function too liberal (in terms of accepted characters)?
- Avoid glitchy characters – my own version of the problem
- Adding inline JavaScript encoding issue
- How to use Japanese characters for a single page
- esc_js() breaks unicode sequences by removing the slash ‘\’ character
- Post editor loads empty
- How do I convert a MySQL database from utf8mb4 to utf8 encoding?
- Special Character Appearing in my WordPress Pages Content
- encoded search terms with %20
- UTF-32be error WordPress
- How to distinguish between a hack and an encoding error?
- Uploaded image with non-english characters is named incorrectly in upload folder
- wp_mail encode ’ in ’ in subject
- Email Obfuscation: Is antispambot() Acceptable? [closed]
- WordPress site stopped working after simply opening header.php in the wp-admin editor
- ✓ Checkmark Character Encoding Issue In WordPress Editor
- How to Fix Mangled Thai Characters
- Encode URL for WhatsApp “click to chat” without loosing accented characters
- Encoding matter – ? instead of € after settings field callback
- Issue with json decode in WordPress – value is not returning consistently
- WordPress Dutch characters encoding problem
- Encoding video without exec function
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- How are cookie values encoded?
- How to encode correclty an url with the char “&” for an email?
- Rest API encoding of double quotes
- How can I automatically add a post with Latin characters?
- Migrating a WordPress site has broken UTF8 encoding
- All of my wordpress sites showing †Ù¥
- TinyMCE HTML Encode Backslash
- wp-login.php ampersand in url results in 404
- Special characters showing in fallback font
- WordPress Database Charset/Collate
- How to pass post title (which could include &) to Gravity Form
- wp_insert_post and title not utf8 inserts with empty title?
- Non english charcters support for WP Customer Reviews
- Language selection for blog doesn’t exist?
- Modify WordPress to not replace + (plus) characters from URLs?
- js code not stored in database currectly