View Single Post
Old 09-22-2008, 04:54 PM   #26 (permalink)
itsnotabigtruck
you lost the game.
zB Programmer
Moderator
Elite Zuner
 
itsnotabigtruck's Avatar
 
Join Date: May 2008
Posts: 2,434
itsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud of
Default

Quote:
Originally Posted by shutout5591 View Post
Can you pm me the code? Just the class and its usage. Thanks!
I'll just post it right here.

Code:
string FilterText(string str)
{
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < str.Length; ++i)
        sb.Append((str[i] >= 32 && str[i] <= 126) ? str[i] : '?');
    return sb.ToString();
}
Change the range of characters it checks for if you are using CharacterRegions other than the default. You need to run that function on any text that might contain accented characters (that namely includes names of stuff from the user's music library) before passing it to DrawString.
__________________

signature by vettexl




itsnotabigtruck is offline   Reply With Quote