1.1/statuses/update.json - Extended Ascii - Error Code 32


#1

Emoji & NON-Ascii Characters causing “Authorization Required” Error Code 32 from Twitter OAuth1.0a. I have updated my URLEncoder, and can verify that it is now properly encoding non-ascii symbols. So, back to my original problem. Why does it break authentication? Deadline looming… Below is my updated URLEncoder.cs

public class UrlEncoder
{
    public static string UrlEncode(string value)
    {
        const string ReservedChars = @"`!@#$^&*()+=,:;'?/|\[] ";
        
        var result = new StringBuilder();

        if (string.IsNullOrWhiteSpace(value))
            return string.Empty;

        var escapedValue = Uri.EscapeDataString(value);

        foreach (char symbol in escapedValue)
        {
            if (ReservedChars.IndexOf(symbol) != -1)
            {
                result.Append('%' + String.Format("{0:X2}", (int)symbol).ToUpper());
            }
            else
            {
                result.Append(symbol);
            }
        }

        return result.ToString();
    }
}

@andypiper - Can you please assist?