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

Bug - Strange encoding (40° => &#176) #1118

Open
johnykes opened this issue Dec 20, 2024 · 5 comments
Open

Bug - Strange encoding (40° => &#176) #1118

johnykes opened this issue Dec 20, 2024 · 5 comments
Labels
bug object updating Bugs and strange behavior around updating objects, primarly related to #284

Comments

@johnykes
Copy link

Hello,

I have some encoding problems and I don't know how to fix them.

For example when I try to set this title to a product:

shopifyProduct.Title= "Spiral flute 40°"

That's what I see in Shopify: Spiral flute 40&#176

I also have this problem with special characters specific to some language only.

How can I fix that?

Version: 6.19.0

@nozzlegear
Copy link
Owner

nozzlegear commented Dec 20, 2024

Hey! My first suspicion is that this is something Shopify is doing on their end automatically, as that character sequence looks like the HTML decimal reference for the degree symbol. I'd bet if you looked at the product on the storefront, it would render as Spiral flute 40°.

Can you try changing the product title to another HTML character, just to confirm?

Input Output
Spiral flute 40 & Spiral Flue 40 &#38
Spiral Flue 40 ® Spiral Flue 40 &#174

Edit: it'd also be good to confirm if you edit a product directly via the store admin, does ShopifySharp then get/list it with the encoded character or with the º character?

@johnykes
Copy link
Author

In shopify I see "&#176", not °.
If I manually edit in the admin dashboard to °, it works, but if I do the update using ShopifySharp, it's converted into &#176.
Couldn't find any setting/option to solve this.

@nozzlegear
Copy link
Owner

Ah okay, thanks for confirming! It sounds like it's a bug in ShopifySharp then. Are you using the ProductService class to update your product?

@nozzlegear nozzlegear added bug object updating Bugs and strange behavior around updating objects, primarly related to #284 and removed unconfirmed bug labels Dec 20, 2024
@johnykes
Copy link
Author

Yes, I am using ProductService

@nozzlegear
Copy link
Owner

I'm thinking it's a bug in how we've configured the Json serializer. I'll add some unit tests and get this fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug object updating Bugs and strange behavior around updating objects, primarly related to #284
Projects
None yet
Development

No branches or pull requests

2 participants