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

Ways to not encode latin characters ? #22

Open
ghost opened this issue Feb 7, 2017 · 9 comments
Open

Ways to not encode latin characters ? #22

ghost opened this issue Feb 7, 2017 · 9 comments

Comments

@ghost
Copy link

ghost commented Feb 7, 2017

Hi, some questions :

  1. Is there a way to not encode latin characters using PHPWee\Minify::html($str) ? All texts containing latin characters are encoded and i dont want that (mostly for DB and others stuff).
  2. Is there a way to minify part of html code without adding the additional doctype / html tags ?

Regards and keep on your good work !

@TakiDDine
Copy link

i had the same probleme , did you found the solution

@ashucg
Copy link

ashucg commented Sep 28, 2017

Hi @TakiDDine ,

Please explain your problem so that someone could take a look at it. Anyway, this repository is dead so don't expect a quick solution as only a bunch of guys are still around to answer your questions and maybe someone will provide you with a solution.

@jonleverrier
Copy link

jonleverrier commented Dec 8, 2017

@ashucg I'm having the same problem. It's hard to pin point exactly what is going wrong.

For example, I have a web page that is UTF-8 encoded. I have some text on the page that says 'Français'. If I turn on phpwee-php-minifier 'Français' becomes 'Français'. Some for other accents and special characters.

@ashucg
Copy link

ashucg commented Dec 9, 2017

@jonleverrier I will take a look at this as soon as I get some time

@jonleverrier
Copy link

jonleverrier commented Dec 9, 2017

that's appreciated @ashucg

in closing, when phpwee-php-minifier is running, it encodes certain characters correctly when using <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> (which is no longer supported with HTML5).

If phpwee-php-minifer is running and <meta charset="utf-8"> is used in replacement of the old html4/xhtml meta tag, certain characters are not encoded, as stated above.

@ashucg
Copy link

ashucg commented Dec 9, 2017

@jonleverrier thanks for mentioning that, it will definitely help me finding the issue.

@ashucg
Copy link

ashucg commented Dec 9, 2017

@jonleverrier you can check the update file here

@jonleverrier
Copy link

Thank you @ashucg. Encoding works great now.

@ashucg
Copy link

ashucg commented Dec 10, 2017

@jonleverrier you are most welcome, I will update you when I make any other changes to the file(s)

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