MFMailComposeViewController file attachment name with foreign characters
<p>I have searched far and wide and was surprised nothing like this came up.
I am trying to send an audio file email attachment (using MFMailComposeViewController) that has Chinese/Kanji characters in the file name. The weird thing is when I use a particular character in the file name, it becomes a long strand of weird characters when I receive the email.</p>

<p>With a file name like "平成23年.m4a", the name of the attachment when I receive the email becomes something like "平成23�"/%1B%28B8%1B%24B7n%1B%28B25%1B%24..."  It is the character "年" that is causing this. If I delete that character, everything is fine. There might be another Chinese/Kanji character out there that might cause the same problem, but I have no idea how to even begin to fix this...I've been pulling my hair out so hopefully someone can help me with this...</p>

<p>Also a similar problem is that with certain email providers (works fine for gmail, yahoo, but not for something like gmboy.com), if I have Japanese characters in the file name, they fail to show up and gets replaced by an underscore sign. (e.g. Testテスト.m4a turns into  Test_.m4a) I feel that this may be related to the problem above.</p>

<p>Here's my code...</p>

<pre><code>/* Set up the mail compose view and put in the body/attachment */
MFMailComposeViewController *mailComposer = [[[MFMailComposeViewController alloc] init] autorelease];

NSMutableDictionary *dict = [[self itemsToSend] objectAtIndex:0];
NSString *path = [dict objectForKey:@"exportFileAddress"];
NSData *myData = [NSData dataWithContentsOfFile:path];
NSString *fileName = @"平成23年.m4a";
[mailComposer addAttachmentData:myData mimeType:@"audio/m4a" fileName:fileName];


[mailComposer setMessageBody:@"Test email" isHTML:YES];

/* Set default subject */
[mailComposer setSubject:@"Email subject"];

mailComposer.mailComposeDelegate = self;        
[self presentModalViewController:mailComposer animated:YES];
</code></pre>

<p>The file attachment name will show up just fine when the MFMailComposeViewController view comes up, but somehow during the sending process, the name got screwed up.</p>

<p>Any help will be GREATLY appreciated!</p>
