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

Remove charset=utf8 #60

Closed
GreLI opened this issue Feb 15, 2017 · 6 comments
Closed

Remove charset=utf8 #60

GreLI opened this issue Feb 15, 2017 · 6 comments

Comments

@GreLI
Copy link

GreLI commented Feb 15, 2017

;charset=utf8 part in css url() seems to be excessive. It looks like modern browsers can parse such SVGs correctly without it, while IE needs url-encoding of non-ascii symbols anyway.

@bhovhannes
Copy link
Owner

@GreLI, do you know any official source about browser support you've mentioned?
I want to understand which browsers we'll break if remove ;charset=utf8 part...

@GreLI
Copy link
Author

GreLI commented Feb 15, 2017

With ascii-only symbols it's 100% works everywhere. I've used it in a large russian portal (Yandex). With non-ascii my quick test shows that works also everywhere, but only uri-encoded in IE. It seems to have no difference in the respect to presence of charset string.

I believe, it's a combo of a CSS parser and browser URL parser. IE parser is a bit specific one.

@GreLI
Copy link
Author

GreLI commented Feb 15, 2017

Actually, after some playing with it, it seems that any value of charset make no effect. Either browsers are too smart and detect it automatically, or it just useless.

@GreLI
Copy link
Author

GreLI commented Feb 15, 2017

No, it doesn't seem to detect (url-encoded) charset other than utf-8, even if I specify it. Probably, URL strings are being parsed as utf-8 by default.

@bhovhannes
Copy link
Owner

Released in v2.0.2

@GreLI
Copy link
Author

GreLI commented Feb 16, 2017

Cool! Thanks!

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

2 participants