PHP Classes

Unicode on phpclasses.org

Recommend this page to a friend!

      Top level forums  >  Site  >  Features  >  Unicode on phpclasses.org  >  (Un) Subscribe thread alerts  
Subject:Unicode on phpclasses.org
Summary:My unicode content is replaced by entities (what I don't want)
Messages:4
Author:Maik Greubel
Date:2014-11-08 04:18:31
Update:2014-11-08 05:51:31
 

  1. Unicode on phpclasses.org   Reply   Report abuse  
Picture of Maik Greubel Maik Greubel - 2014-11-08 04:39:09
Hello,

recently I updated one of my packages to support unicode and uploaded an example script containing that kind of data. The script was automatically changed in content by modifying the unicode string into entities which changes the behaviour of the script.

In my opinion the site should not modify any source code. I understand that this could be an security issue, but the users of my package will post some forum thread, why the code produces that unpredictable result.

Is there a chance to get arround this auto-modification and provide a predictable result of example script?

Thank you and regards

Maik

  2. Re: Unicode on phpclasses.org   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-11-08 04:45:23 - In reply to message 1 from Maik Greubel
The site does not really change the contents of package files ever.

What may happen is when displaying file contents, since the default encoding is ISO Latin 1, some characters may be incorrectly displayed.

Still the actual files being download are not changed from the original that is uploaded by the author.

If you believe some encoding problems may be affecting your package files, just let me know which ones you think are having problems.

  3. Re: Unicode on phpclasses.org   Reply   Report abuse  
Picture of Maik Greubel Maik Greubel - 2014-11-08 05:28:19 - In reply to message 2 from Manuel Lemos
Thank you for clarifying. But take a look at this forum thread:

phpclasses.org/discuss/package/8890 ...

I posted the string in unicode (which was also displayed in form) but at result the entities are displayed.

  4. Re: Unicode on phpclasses.org   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-11-08 05:51:31 - In reply to message 3 from Maik Greubel
That is what your browser is sending.

Currently the site only supports ISO Latin 1 to display pages. When you submit a form with non-ISO Latin 1 characters, your browser converts those characters to HTML entities in the hope that the sites will display them in HTML as it is to make the original characters. However, the site always encodes text using HtmlSpecialChars, and so & characters lose special meaning.

So it is behaving as expected.

Maybe in the future the site will switch the default encoding to UTF-8 but that requires a very large migration effort, so it is hard to anticipate when it will happen.