-
Notifications
You must be signed in to change notification settings - Fork 115
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
PHP encoding issue #40
Comments
I think PHP is scanned as ASCII-8BIT (same as BINARY) right now because I read that's how it's supposed to be scanned. If newer PHP versions can handle code like this, we have to update the scanner. |
Thanks to answer korny! The problem even bigger. UTF in php syntax is quite new thing. But not-ascii comments - this is what people did...like really long time. And check same link (changed it) http://coderay.rubychan.de/rays/7695 function php中文() {
// Even in comment! russina comment here: Руский комментарий тут
$issue = 'there is a encoding issue in php highlighting';
} We use coderay in redmine on PHP project and this is big problem for us. Can you help and tell how hard to fix at last comments encoding? Is it easy, like change in PHP < Scanerr this line code encoding 'BINARY' or we need to go deeper? I would like try to fix at last comments for php, but if you will show a way - this will help a lot. |
One more thing, php hightlighting works good with redmine 2.0.4 on my Mac (coderay 1.0.8), but works not good on my another redmine 2.0.4 in centOS (coderay 1.0.8) . I can provide more infomation if you need. |
Mac:
CentOS:
|
using rvm on mac, if the ruby version is 1.9.3 (x86_64-darwin11.4.0) , if the ruby version used is system 1.8.7 (universal-darwin11.0), |
Ruby 1.8.7 didn't support encodings, so the UTF-8 codepoints probably passed through CodeRay as if they were ASCII-8BIT/BINARY. On the other hand, Ruby 1.9.x has support for encodings, which could explain the difference you are seeing. |
source:
result:
http://coderay.rubychan.de/rays/7695
P.S. only php have encoding issue
The text was updated successfully, but these errors were encountered: