patrickTingen / DataDigger

A dynamic dataviewer for your Progress / OpenEdge databases
https://datadigger.wordpress.com/
MIT License
50 stars 24 forks source link

Strange characters #38

Closed dlabas2 closed 6 years ago

dlabas2 commented 6 years ago

I've installed the latest version of Beta 20180824 and when I'm trying to type the croatian characters (đšžćčĐŠŽĆČ) in in the database filter field I get the following results:I've installed the latest version of Beta 20180824 and when I'm trying to type the croatian characters (đšžćčĐŠŽĆČ) in in the database filter field I get the following results:

pic1

When I write that in the filter database, everything is fine.

pic2

patrickTingen commented 6 years ago

Hi Dubravko,

I was able to reproduce your issue and I also found a way to solve it. The problem is in the font that is used for the fill-in. The characters that are displayed wront are simply not in that font and thus cannot be displayed (check this KB entry. The query editor is an editor widget and is somehow different than a fill-in because an editor accepts the strange characters regardless of the font or codepage. My guess is that Progress uses a Windows widget for this, but I am not sure.

The solution is quite simple, just select another font. For this to work, I set the codepage to UTF-8 in the datadigger.pf file:

-cpcase BASIC
-cpinternal UTF-8
-cplog UTF-8
-cpterm UTF-8
-cpcoll BASIC 

Then, head into the settings, untick 'Automatically set fonts' and choose a font that can hold the Croatian characters, in my example I used 'Arial': image image

Press OK and now you can paste the Croatian text: image

dlabas2 commented 6 years ago

Hi Patric, Thanks for the quick intervention.

My Session parameters (OE10.2BSP8) is:

APPL-ALERT-BOXES       = no
BATCH-MODE             = no
CHARSET                = 1250
CONTEXT-HELP-FILE      = ?
CPCASE                 = Basic
CPCOLL                 = Croatian
CPINTERNAL             = 1250
CPLOG                  = 1250
CPPRINT                = 1250
CPRCODEIN              = ?
CPRCODEOUT             = ?
CPSTREAM               = 1250
CPTERM                 = 1250
DATA-ENTRY-RETURN      = no
DATE-FORMAT            = dmy
DEBUG-ALERT            = FALSE
DISPLAY-TYPE           = GUI
FIRST-ASYNC-REQUEST    = ?
FIRST-CHILD            = 1025 [WINDOW]
FIRST-PROCEDURE        = adeuib/_abfuncs.w
FIRST-SERVER           = ?
FIRST-SOCKET           = ?
FRAME-SPACING          = 26
GET-PRINTERS()         = Send To OneNote 2016,Microsoft XPS Document W
HEIGHT-CHARS           = 33,23
HEIGHT-PIXELS          = 864
IMMEDIATE-DISPLAY      = no
LAST-ASYNC-REQUEST     = ?
LAST-CHILD             = 1682 [WINDOW]
LAST-PROCEDURE         = adecomm/as-utils.w
LAST-SERVER            = ?
LAST-SOCKET            = ?
MULTITASKING-INTERVAL  = 0
NUMERIC-DECIMAL-POINT  = ,
NUMERIC-FORMAT         = EUROPEAN
NUMERIC-SEPARATOR      = .
OLE-INVOKE-LOCALE      = 0
OLE-NAMES-LOCALE       = 1033
PARAMETER              =
PIXELS-PER-COLUMN      = 7
PIXELS-PER-ROW         = 26
PRINTER-CONTROL-HANDLE = 0
PRINTER-HDC            = 0
PRINTER-NAME           = \\srv-tbj-av02\Printer
PRINTER-PORT           = nul:
REMOTE                 = FALSE
STREAM                 = 1250
SUPER-PROCEDURES       = <none>
SUPPRESS-WARNINGS      = no
SYSTEM-ALERT-BOXES     = yes
TEMP-DIRECTORY         = D:\Work10\Varkom\INI\
THREE-D                = yes
TIME-SOURCE            = LOCAL
TOOLTIPS               = TRUE
TYPE                   = PSEUDO-WIDGET
V6DISPLAY              = no
WAIT-STATE             = <none>
WIDTH-CHARS            = 219,43
WIDTH-PIXELS           = 1536
WINDOW-SYSTEM          = MS-WINXP
WORK-AREA-HEIGHT-PIXELS= 864
WORK-AREA-WIDTH-PIXELS = 1536
WORK-AREA-X            = 0
WORK-AREA-Y            = 0
YEAR-OFFSET            = 1950

In DataDigger Version 23 with same settings everything works perfectly. When I paste this characters in filter field everyting is OK ?

Thank You for your effort

dlabas2 commented 6 years ago

I accidentally closed issue

patrickTingen commented 6 years ago

With your codepage settings (1250 / Croatian) and font Arial-Regular I was able to use the Croatian characters in all fields where it would be appropriate:

image

Why this version behaves different from the previous, I cannot tell, but it looks as if this could be a workaround for you. Other fonts that worked for me where 'MS Reference', 'Lucida Sans' and 'Consolas', but there will undoubtedly be more.

dlabas2 commented 6 years ago

Problemi is in trigger ANY-PRITABLE that was added in the new version in CREATE COMBO-BOX hFilterField

This trigger does not work well and I think it's related to KB https://knowledgebase.progress.com/articles/Article/P129767

When I get rid of that triger, everything is working fine.

Thank You for your effort.

patrickTingen commented 6 years ago

What happens if you change the trigger from ANY-PRINTABLE to ANY-KEY? The functionality in the trigger is needed for the filters to reset to their 'shadow text' at the right moment.

This is difficult for me to test because I can only add Croatian characters like Ž by typing alt-0142. Typing alt-0142 in the filter does nothing on my computer and I don't dare to install Croatian as a Windows language since I don't understand a word Croatian :)

PS: While working on this I also fixed the bug that saving fonts in the settings screen did not survive a restart.

dlabas2 commented 6 years ago

The same thing is happening. It's not a big problem, I think VALUE-CHANGED works the same. Thank you very much for the effort and you do not have to deal with it anymore. I can always copy and paste these few characters.