Problem with multi byte characters

SyntaxEditor for Windows Forms Forum

Posted 11 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 12.1.0288
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar

Hi,

we have the problem that multibyte characters are not displayed correctly.
These are japanese characters and we use the japanese encoding (Shift-JIS, Codepage 932).
It seems the characters are read correclty and this is only a visual problem.

As you can see in this picture (http://picload.org/image/arcaccg/japanese_charact.png), the characters are shifted depending on where the caret is.
The correct string would be: write("出力Windowに多くの情報を表示するため、キー1押下でDbgLevel = 1に設定");
Since the problem is worst with monotype fonts, I assume that the characters exceed the width of the font.
The font on the screenshot is Consolas but the same problem applies to Courier New too.


Unicode is enabled and I have not found any other option that could enable multi byte character support.

[Modified 11 years ago]


Best regards, Tobias Lingemann.

Comments (6)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

I pasted this in the latest version and don't see anything moving around as the caret moves.  This sounds like it might be something we fixed in the past.  Can you try with the latest version?


Actipro Software Support

Answer - Posted 11 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

I am sorry. It seems I got confused by the many branches that we have. I enabled the unicode support on one, but tested with the other.


Best regards, Tobias Lingemann.

Posted 10 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

UTF-8 characters with two or three bytes are working fine. But starting with four bytes I get problems. Some seem fine on the first look (e.g. http://www.fileformat.info/info/unicode/char/24F5C/index.htm) and others are not working at all (e.g. http://www.fileformat.info/info/unicode/char/1f64a/index.htm).

It seems that characters with four bytes are considered as two characters. The main problem for me is that the offset of one character is two. Is there anything you can do here with WinForms?


Best regards, Tobias Lingemann.

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

Thanks for reporting this.  We've updated our code for the next build (of SyntaxEditor in other platforms as well) to properly move the caret/selection around multi-byte characters and also handle Delete/Backspace better for those characters (treat them as a single unit).

In the WinForms SyntaxEditor, we have also fixed some bugs with rendering multi-byte characters that can occur.

With the changes mentioned above, multi-byte character editing and rendering should now work as expected.  These updates will be in the next maintenance release.  If you would like to try a preview build, please write our support address and mention this thread.


Actipro Software Support

Posted 9 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Hm, we are now using build 320 and I can't really see a difference. Are there some settings, I have to change? I have enabled unicode and the encoding is UTF8.

When I change the selection, I need two steps to scroll through this one character ( 𤽜 ). The column, document length and offset also interpret this is as two characters (e.g. an empty document with only this one character has the length 2). When I only select one of both parts, the display of the character is broken (I get two empty boxes).


Best regards, Tobias Lingemann.

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

The updates mentioned above were made in build 321.  You should upgrade to that build instead.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.