Wrong UTF8 text hyphenation in LazReport - WrapMemo - FPPrintGrid (and others)
Original Reporter info from Mantis: zgabrovski
-
Reporter name: Zdravko Gabrovski
Original Reporter info from Mantis: zgabrovski
- Reporter name: Zdravko Gabrovski
Description:
I catch a small bug inside OutLine and WrapLine methods, which is part ot TfrCustomMemoView.WrapMemo memo.
There is a problem with text hyphen for UTF8 characters (Cyrillic words in my case ).
The problem comes from using of non-utf8 compatible string function in hyphenation - Length, Copy, etc., ehich is not work correct with UTF8 characters.
The simplest solution is to replace input string type of those two methods with UnicodeString at lines 3815 and 3832 in LR_Class.pas, which causes the functions used to work fine (like in Delphi).
Please, find attached pictures with buggy hyphen (before the fix), Correct hyphen (after the fix), and source code change.
The patch is in the .diff file.
Steps to reproduce:
As described above.