Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Render cyrillic #31

Closed
baceto90 opened this issue Jul 8, 2016 · 2 comments
Closed

Render cyrillic #31

baceto90 opened this issue Jul 8, 2016 · 2 comments

Comments

@baceto90
Copy link

baceto90 commented Jul 8, 2016

Hi guys,
its a great library, but i have problem with Rendering on cyrillic symbols.

$from_text = "Някаква кирилица";
$to_text = "Някаква кирилица, тест";

$from_text = mb_convert_encoding($from_text, 'HTML-ENTITIES', 'UTF-8');
$to_text = mb_convert_encoding($to_text, 'HTML-ENTITIES', 'UTF-8');

$diff_opcodes = FineDiff::getDiffOpcodes($from_text, $to_text, 2);
$rendered_diff = FineDiff::renderDiffToHTMLFromOpcodes($from_text, $diff_opcodes);

echo $rendered_diff

When i try to print $rendered_diff it shows me:
������� ��������, ����

� => &.#.2.0.1.3.2.6.5.9.3.3; (without points)
Whats wrong with it?

I tested here http://www.raymondhill.net/finediff/viewdiff-ex.php and works great...

@gorhill
Copy link
Owner

gorhill commented Jul 8, 2016

It works on bytes, not on characters.

See #11.

@gorhill gorhill closed this as completed Jul 8, 2016
@baceto90
Copy link
Author

baceto90 commented Jul 8, 2016

Thanks for the replay. I saw this topic, but the downloading patch link is not available and i don't know how to integrated myself...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants