[twitter-dev] Re: 401 Unauthorized error while posting status with Unicode characters (non english characters)
Thanks, I will try that! On Sat, Sep 26, 2009 at 8:11 AM, JDG wrote: > That's true -- %5BB6, for example, is NOT a UTF-8 encoded codepoint for a > character. It's Unicode (or UTF-16). > > On Fri, Sep 25, 2009 at 20:54, Mageuzi wrote: > >> >> Hello, >> I had this same problem. I had to convert all multi-byte characters >> into their individual bytes. >> So, for example, for the character "の": >> Your example has %306E, but the encoding that works for me is >> %E3%81%AE (three bytes for the three-byte character). >> >> >> On Sep 25, 5:00 pm, Satheesh Natesan >> wrote: >> > Yes, it is UTF-8 encoded. >> > >> > The request body for "の脚本家が贈る" is >> > >> oauth_consumer_key=wmeO7Y20oMFa1ptKVY4WA&oauth_nonce=3231757&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1253903495&oauth_token=76084396-0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ&oauth_version=1.0&status=%306E%811A%672C%5BB6%304C%8D08%308B&oauth_signature=AMcLsF43vPP6Hmn8fv%2bZCMdqEnU%3d >> > >> > and the base signature is >> > >> POST&http%3A%2F%2Ftwitter.com%2Fstatuses%2Fupdate.json&oauth_consumer_key%3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce%3D3231757%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1253903495%26oauth_token%3D76084396-0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version%3D1.0%26status%3D%25306E%25811A%25672C%255BB6%25304C%258D08%25308B >> > >> > Do you see anything wrong here? >> > >> > Thanks! >> > Satheesh Natesan >> > >> > >> > >> > On Thu, Sep 24, 2009 at 6:49 PM, Carlos wrote: >> > >> > > Are you sure you are encoding your posts as UTF-8? >> > >> > > On Sep 24, 5:16 pm, Satheesh Natesan >> > > wrote: >> > > > I am getting "401 Unauthorized" exception when updating status with >> > > > non english characters using my app. >> > >> > > > This exception is happening for any Japanese or Korean characters. >> > >> > > > Another interesting thing is that it is possible to post some other >> > > > non english characters like Malayalam. The exception will not happen >> > > > for single word in these cases, but occurs for multiple words. >> > > > For example consider the following example >> > >> > > > ØáÇÞµæù çµdw - does not work >> > >> > > > ØáÇÞµæùçµdw - with space removed works. >> > >> > > > Base signature for "ØáÇÞµæù çµdw" which throws exception is >> > >> > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses >> > > > %2Fupdate.json&oauth_consumer_key% >> > > > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce >> > > > %3D4504682%26oauth_signature_method% >> > > > 3DHMAC-SHA1%26oauth_timestamp%3D1253727596%26oauth_token%3D76084396- >> > > > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version >> > > > %3D1.0%26status% >> > > > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%2520%25E7%25B5dw >> > >> > > > and for "ØáÇÞµæùçµdw" which works is >> > >> > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses >> > > > %2Fupdate.json&oauth_consumer_key% >> > > > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce >> > > > %3D9388868%26oauth_signature_method% >> > > > 3DHMAC-SHA1%26oauth_timestamp%3D1253727793%26oauth_token%3D76084396- >> > > > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version >> > > > %3D1.0%26status% >> > > > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%25E7%25B5dw >> > >> > > > OAuth client library I am using is in .Net >> > >> > > > Could you please help to solve this issue? Also I would like to know >> > > > you support all unicode characters. >> > > > Your help is greatly appreciated. >> > >> > > > Thanks, >> > > > Satheesh Natesan- Hide quoted text - >> > >> > - Show quoted text - > > > > > -- > Internets. Serious business. >
[twitter-dev] Re: 401 Unauthorized error while posting status with Unicode characters (non english characters)
That's true -- %5BB6, for example, is NOT a UTF-8 encoded codepoint for a character. It's Unicode (or UTF-16). On Fri, Sep 25, 2009 at 20:54, Mageuzi wrote: > > Hello, > I had this same problem. I had to convert all multi-byte characters > into their individual bytes. > So, for example, for the character "の": > Your example has %306E, but the encoding that works for me is > %E3%81%AE (three bytes for the three-byte character). > > > On Sep 25, 5:00 pm, Satheesh Natesan > wrote: > > Yes, it is UTF-8 encoded. > > > > The request body for "の脚本家が贈る" is > > > oauth_consumer_key=wmeO7Y20oMFa1ptKVY4WA&oauth_nonce=3231757&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1253903495&oauth_token=76084396-0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ&oauth_version=1.0&status=%306E%811A%672C%5BB6%304C%8D08%308B&oauth_signature=AMcLsF43vPP6Hmn8fv%2bZCMdqEnU%3d > > > > and the base signature is > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses%2Fupdate.json&oauth_consumer_key%3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce%3D3231757%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1253903495%26oauth_token%3D76084396-0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version%3D1.0%26status%3D%25306E%25811A%25672C%255BB6%25304C%258D08%25308B > > > > Do you see anything wrong here? > > > > Thanks! > > Satheesh Natesan > > > > > > > > On Thu, Sep 24, 2009 at 6:49 PM, Carlos wrote: > > > > > Are you sure you are encoding your posts as UTF-8? > > > > > On Sep 24, 5:16 pm, Satheesh Natesan > > > wrote: > > > > I am getting "401 Unauthorized" exception when updating status with > > > > non english characters using my app. > > > > > > This exception is happening for any Japanese or Korean characters. > > > > > > Another interesting thing is that it is possible to post some other > > > > non english characters like Malayalam. The exception will not happen > > > > for single word in these cases, but occurs for multiple words. > > > > For example consider the following example > > > > > > ØáÇÞµæù çµdw - does not work > > > > > > ØáÇÞµæùçµdw - with space removed works. > > > > > > Base signature for "ØáÇÞµæù çµdw" which throws exception is > > > > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses > > > > %2Fupdate.json&oauth_consumer_key% > > > > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce > > > > %3D4504682%26oauth_signature_method% > > > > 3DHMAC-SHA1%26oauth_timestamp%3D1253727596%26oauth_token%3D76084396- > > > > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version > > > > %3D1.0%26status% > > > > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%2520%25E7%25B5dw > > > > > > and for "ØáÇÞµæùçµdw" which works is > > > > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses > > > > %2Fupdate.json&oauth_consumer_key% > > > > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce > > > > %3D9388868%26oauth_signature_method% > > > > 3DHMAC-SHA1%26oauth_timestamp%3D1253727793%26oauth_token%3D76084396- > > > > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version > > > > %3D1.0%26status% > > > > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%25E7%25B5dw > > > > > > OAuth client library I am using is in .Net > > > > > > Could you please help to solve this issue? Also I would like to know > > > > you support all unicode characters. > > > > Your help is greatly appreciated. > > > > > > Thanks, > > > > Satheesh Natesan- Hide quoted text - > > > > - Show quoted text - -- Internets. Serious business.
[twitter-dev] Re: 401 Unauthorized error while posting status with Unicode characters (non english characters)
Hello, I had this same problem. I had to convert all multi-byte characters into their individual bytes. So, for example, for the character "の": Your example has %306E, but the encoding that works for me is %E3%81%AE (three bytes for the three-byte character). On Sep 25, 5:00 pm, Satheesh Natesan wrote: > Yes, it is UTF-8 encoded. > > The request body for "の脚本家が贈る" is > oauth_consumer_key=wmeO7Y20oMFa1ptKVY4WA&oauth_nonce=3231757&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1253903495&oauth_token=76084396-0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ&oauth_version=1.0&status=%306E%811A%672C%5BB6%304C%8D08%308B&oauth_signature=AMcLsF43vPP6Hmn8fv%2bZCMdqEnU%3d > > and the base signature is > POST&http%3A%2F%2Ftwitter.com%2Fstatuses%2Fupdate.json&oauth_consumer_key%3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce%3D3231757%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1253903495%26oauth_token%3D76084396-0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version%3D1.0%26status%3D%25306E%25811A%25672C%255BB6%25304C%258D08%25308B > > Do you see anything wrong here? > > Thanks! > Satheesh Natesan > > > > On Thu, Sep 24, 2009 at 6:49 PM, Carlos wrote: > > > Are you sure you are encoding your posts as UTF-8? > > > On Sep 24, 5:16 pm, Satheesh Natesan > > wrote: > > > I am getting "401 Unauthorized" exception when updating status with > > > non english characters using my app. > > > > This exception is happening for any Japanese or Korean characters. > > > > Another interesting thing is that it is possible to post some other > > > non english characters like Malayalam. The exception will not happen > > > for single word in these cases, but occurs for multiple words. > > > For example consider the following example > > > > ØáÇÞµæù çµdw - does not work > > > > ØáÇÞµæùçµdw - with space removed works. > > > > Base signature for "ØáÇÞµæù çµdw" which throws exception is > > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses > > > %2Fupdate.json&oauth_consumer_key% > > > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce > > > %3D4504682%26oauth_signature_method% > > > 3DHMAC-SHA1%26oauth_timestamp%3D1253727596%26oauth_token%3D76084396- > > > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version > > > %3D1.0%26status% > > > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%2520%25E7%25B5dw > > > > and for "ØáÇÞµæùçµdw" which works is > > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses > > > %2Fupdate.json&oauth_consumer_key% > > > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce > > > %3D9388868%26oauth_signature_method% > > > 3DHMAC-SHA1%26oauth_timestamp%3D1253727793%26oauth_token%3D76084396- > > > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version > > > %3D1.0%26status% > > > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%25E7%25B5dw > > > > OAuth client library I am using is in .Net > > > > Could you please help to solve this issue? Also I would like to know > > > you support all unicode characters. > > > Your help is greatly appreciated. > > > > Thanks, > > > Satheesh Natesan- Hide quoted text - > > - Show quoted text -
[twitter-dev] Re: 401 Unauthorized error while posting status with Unicode characters (non english characters)
Yes, it is UTF-8 encoded. The request body for "の脚本家が贈る" is oauth_consumer_key=wmeO7Y20oMFa1ptKVY4WA&oauth_nonce=3231757&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1253903495&oauth_token=76084396-0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ&oauth_version=1.0&status=%306E%811A%672C%5BB6%304C%8D08%308B&oauth_signature=AMcLsF43vPP6Hmn8fv%2bZCMdqEnU%3d and the base signature is POST&http%3A%2F%2Ftwitter.com%2Fstatuses%2Fupdate.json&oauth_consumer_key%3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce%3D3231757%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1253903495%26oauth_token%3D76084396-0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version%3D1.0%26status%3D%25306E%25811A%25672C%255BB6%25304C%258D08%25308B Do you see anything wrong here? Thanks! Satheesh Natesan On Thu, Sep 24, 2009 at 6:49 PM, Carlos wrote: > > Are you sure you are encoding your posts as UTF-8? > > On Sep 24, 5:16 pm, Satheesh Natesan > wrote: > > I am getting "401 Unauthorized" exception when updating status with > > non english characters using my app. > > > > This exception is happening for any Japanese or Korean characters. > > > > Another interesting thing is that it is possible to post some other > > non english characters like Malayalam. The exception will not happen > > for single word in these cases, but occurs for multiple words. > > For example consider the following example > > > > ØáÇÞµæù çµdw - does not work > > > > ØáÇÞµæùçµdw - with space removed works. > > > > Base signature for "ØáÇÞµæù çµdw" which throws exception is > > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses > > %2Fupdate.json&oauth_consumer_key% > > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce > > %3D4504682%26oauth_signature_method% > > 3DHMAC-SHA1%26oauth_timestamp%3D1253727596%26oauth_token%3D76084396- > > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version > > %3D1.0%26status% > > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%2520%25E7%25B5dw > > > > and for "ØáÇÞµæùçµdw" which works is > > > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses > > %2Fupdate.json&oauth_consumer_key% > > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce > > %3D9388868%26oauth_signature_method% > > 3DHMAC-SHA1%26oauth_timestamp%3D1253727793%26oauth_token%3D76084396- > > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version > > %3D1.0%26status% > > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%25E7%25B5dw > > > > OAuth client library I am using is in .Net > > > > Could you please help to solve this issue? Also I would like to know > > you support all unicode characters. > > Your help is greatly appreciated. > > > > Thanks, > > Satheesh Natesan >
[twitter-dev] Re: 401 Unauthorized error while posting status with Unicode characters (non english characters)
Are you sure you are encoding your posts as UTF-8? On Sep 24, 5:16 pm, Satheesh Natesan wrote: > I am getting "401 Unauthorized" exception when updating status with > non english characters using my app. > > This exception is happening for any Japanese or Korean characters. > > Another interesting thing is that it is possible to post some other > non english characters like Malayalam. The exception will not happen > for single word in these cases, but occurs for multiple words. > For example consider the following example > > ØáÇÞµæù çµdw - does not work > > ØáÇÞµæùçµdw - with space removed works. > > Base signature for "ØáÇÞµæù çµdw" which throws exception is > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses > %2Fupdate.json&oauth_consumer_key% > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce > %3D4504682%26oauth_signature_method% > 3DHMAC-SHA1%26oauth_timestamp%3D1253727596%26oauth_token%3D76084396- > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version > %3D1.0%26status% > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%2520%25E7%25B5dw > > and for "ØáÇÞµæùçµdw" which works is > > POST&http%3A%2F%2Ftwitter.com%2Fstatuses > %2Fupdate.json&oauth_consumer_key% > 3DwmeO7Y20oMFa1ptKVY4WA%26oauth_nonce > %3D9388868%26oauth_signature_method% > 3DHMAC-SHA1%26oauth_timestamp%3D1253727793%26oauth_token%3D76084396- > 0M9ll2nghrjWhjALbH7YEHXizcLDNvoLfgXKfHQZQ%26oauth_version > %3D1.0%26status% > 3D%25D8%25E1%25C7%25DE%25B5%25E6%25F9%25E7%25B5dw > > OAuth client library I am using is in .Net > > Could you please help to solve this issue? Also I would like to know > you support all unicode characters. > Your help is greatly appreciated. > > Thanks, > Satheesh Natesan