Project

General

Profile

Bug #31

Use a default non western codepage and using local characters show up as ????

Added by Wil van Antwerpen about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
03/27/2017
Due date:
% Done:

0%


Description

sergey
Although with yesterday's fix it shows Russian now, it does not allow to type in Russian. Instead symbols I have get '?????' (question marks).

wil
You mean the line:

Move (ToANSI(sLine)) to sLine

In method AddLineToBuffer?

Yeah I can imagine that that only fixes reading.
The control is fully unicode capable. But as DataFlex is not, that does not help.

But you can tell it what characterset to use by using:

SCI_STYLESETCHARACTERSET

So in page_object try:

Send EditorMessage SCI_STYLESETCHARACTERSET STYLE_DEFAULT SC_CHARSET_ANSI

As it is set –per style- it might have to be set for each style.

You can also try:

SC_CHARSET_DEFAULT and SC_CHARSET_RUSSIAN

sergey
OK, I will check this later (can we make a note under repository or whatever you have there). More likely (and at least for DF) we should provide this automatically rather setting something for each particular language.

More likely (and at least for DF) we should provide this automatically rather setting something for each particular language.
Not sure how it is done in CM, but can not recall I had some issues re Language.

History

#1 Updated by Wil van Antwerpen about 7 years ago

wil
Agreed, less configuration is for sure better.

From what I read the setting is by default SC_CHARSET_DEFAULT and that should make it use the codepage used by your windows.
As that apparently isn’t working, hopefully just setting it to ansi (SC_CHARSET_ANSI) does the trick.
Setting it manually to Russian should work, if even that doesn’t work then we got an issue.

#2 Updated by Wil van Antwerpen almost 7 years ago

  • Status changed from New to In Progress

This was resolved by supplying the text to scintilla in ANSI and then specifically setting the charset

eg:

Move SC_CHARSET_RUSSIAN to iCharSet
Send EditorMessage SCI_STYLESETCHARACTERSET STYLE_DEFAULT iCharSet

We still need a combobox to be able to select the character set to use.

#3 Updated by Wil van Antwerpen over 6 years ago

  • Status changed from In Progress to Resolved

The combobox to set the current script to use is in the font select dialog.
Scintilla will use what you select down there.

#4 Updated by Wil van Antwerpen over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF