I have my own Twitter API and I've received a couple emails about a problem when trying to post a status update with accent marks and other diacritics. I would like to encode these so that the status update still has them.
I know there are ways to remove the diacritic, but I would like to keep it.
I read the Twitter Counting Characters page and noticed that they did talk about encoding the diacritic. I would like to do this in C#. I am just not sure how to do it.
Here was the original bug report for the Twitter API http://code.google.com/p/twitter-api/issues/detail?id=433
I've tried using..
string oldStatus = "con eñe";
string newStatus = oldStatus.Normalize(NormalizationForm.FormD);
I've tried using FormC
, FormKC
, and FormKD
, and I either get the 401 - Unauthorized
error or a Invalid Unicode value in one or more parameters
error.
Any ideas?