问题
This simple script returns deferrent values for iOS/Android.
My environment is titanium 6.0.1.GA
var name = "arn:aws:sns:ap-northeast-1";
Ti.API.info("encodeTest:" + encodeURIComponent(name);
[iOS]
encodeTest:arn%3Aaws%3Asns%3Aap-northeast-1
[android]
encodeTest:arn%%3Aaws%%3Asns%%3Aap-northeast-1
somehow in android escape character '%' is doubled.
I have used this encodeURIComponent function many times before, but at that time (may be titanium 5.0.*.GA), it didn't happnen.
来源:https://stackoverflow.com/questions/43201488/titanium-encodeuricomponent-returns-different-value-ios-android