Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always use ISO-8859-1 encoding #1

Closed
hippasus opened this issue Apr 21, 2017 · 6 comments
Closed

always use ISO-8859-1 encoding #1

hippasus opened this issue Apr 21, 2017 · 6 comments

Comments

@hippasus
Copy link

after struggling for two days, I finally find it out why this code doesn't work on side.
According to royal mail API documentation, they are using the ISO-8859-1 encoding in their system.
Which means, any hashing function on the client should use exactly the same encoding as well.

Hence, in the RoyalMailApiClient.cs file, could you kindly replace all Encoding.Default to Encoding.GetEncoding("iso-8859-1")?

Encoding.Default is OS environment related, and equals to iso-8859-1 when the OS system locale is set to English(United Kingdom). And this is why using Encoding.Default is discouraged...

povilaspanavas added a commit that referenced this issue Apr 22, 2017
@povilaspanavas
Copy link
Owner

Thank you for bringing it up.

Changed the encoding, ran tests on other repository, which uses Royal Mail test server and it still worked.

@Manishpce
Copy link

System.ServiceModel.FaultException: Authorisation Failure getting error when i am implementing royailmail api for print label plz help me thank you

@povilaspanavas
Copy link
Owner

Hi, @Manishpce ,

did you test it both with commit b498851 changes and without it?

I've done it on 23 of May, just a little bit before you posted the message.

@Manishpce
Copy link

yes sir i've already changes ur correction and then implement but getting the error authorisation failure

@povilaspanavas
Copy link
Owner

In that case, are you sure your credentials are correct? Have you tried to test it manually trough Royal Mail website?

@Manishpce
Copy link

yes sir i've tried it on royail mail website getting internal server error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants