Author Topic: rendering of special characters and the draw command  (Read 155 times)

beni.falk

  • Junior Community Member
  • Posts: 9
  • Hero Points: 1
rendering of special characters and the draw command
« on: February 13, 2020, 10:35:50 am »
I am using SlickEdit Pro 2019 (v24.0.1.0 64-bit) on Windows and Linux.

I tried using the draw command with argument 1. The horizontal lines were draws as blanks. The vertical lines were drawn correctly except that every other line contained a question mark instead of the expected character.

Note: I am using the Terminal font for my windows.

I am used to Visual SlickEdit 6.0 (from 2001) where the draw command works perfectly.

Looking into it some further - I tried the ASCII Table menu command. Attached please find the results obtained from both editor versions. As can be observed, SlickEdit does not render some of the characters that are used for line drawing, hence the problem.
Note: these results were obtained with all checkmarks in menu view options being unmarked.

Is this the expected behavior?

Thanks,

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: rendering of special characters and the draw command
« Reply #1 on: February 13, 2020, 02:28:12 pm »
You will need to choose a "Terminal" font or another font which uses the same character set (OEM I think). That will allow drawing characters to correctly display on Windows. I'm not sure where to get a "Terminal" font for Linux. Maybe you could copy the Terminal font from windows to Linux. Another issue you will have on Linux is that the default encoding on most Linux systems is Utf-8 and not active code page. The command "e +ftext  /tmp/junk.txt" will open a file as active code page. You can do this from the Open dialog as well (choose "Text, SBC/DBCS mode")

You can override SlickEdit's default encoding globally on Linux so most files are opened as active code page (Tools>Options>File Options>Load>Encoding).
You can also override SlickEdit's default encoding per file extension (Tools>Options>Languages>File Extension Manager).
« Last Edit: February 13, 2020, 02:37:19 pm by Clark »

beni.falk

  • Junior Community Member
  • Posts: 9
  • Hero Points: 1
Re: rendering of special characters and the draw command
« Reply #2 on: February 13, 2020, 05:47:57 pm »
Clark,

I am using the Terminal font. I suspected that it could be a font problem and tried using all possible fonts. This is the only one that showed some promise of working.

I only use Linux occasionally, so it is not a significant issue for me on Linux. What do I need to do to resolve this issue on Windows (for C/C++ and Automatic modes)?

I tried playing with Tools->Options->Languages->C/C++->View->Configure Special Characters, however it only allows configuring character codes in the range 0-31 (decimal) while the draw function uses characters with codes >= 192.

Thanks,

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: rendering of special characters and the draw command
« Reply #3 on: February 13, 2020, 06:54:27 pm »
The only way to get this to work on Windows is by changing the font to an OEM font that works.

I'm getting all the correct characters when I choose the Terminal Font on Windows 10.

See attached picture

beni.falk

  • Junior Community Member
  • Posts: 9
  • Hero Points: 1
Re: rendering of special characters and the draw command
« Reply #4 on: February 13, 2020, 07:56:07 pm »
If I understand correctly, you are saying that this is a problem with the font that I am using and that I need to obtain a different font.

However, this problem does not occur when using VSE 6.0 on the same computer and with the same Terminal font. Do these two editor versions interpret the font in a different way?

Could the problem be somehow related to some Windows settings that I need to modify?

Assuming that the problem stems from the font, it means that my Terminal font is somehow different from yours. Is that possible, and if yes - how can I check it?
I am running the latest build of Windows 10 (64-bit)

Thanks,

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: rendering of special characters and the draw command
« Reply #5 on: February 13, 2020, 08:21:16 pm »
I'm not sure why the Terminal font for you on Windows 10 is different than mine. It's possible that the Windows setting for active code page could have an effect. Mine is probably 1252 which I believe is the default for English. Other than that setting, I'm not aware of another Windows setting that could effect this but there could be. I've done almost nothing to configure my Windows 10 system.

As for v6, it's font selection is way different than the newer versions of SlickEdit which do not support choosing the character set (Qt limitation which forced SlickEdit to drop support for it). Note that modern font dialogs no longer have a combo box for choosing the Script/Character set. It went away due to Unicode. I suspect your terminal font may have two scripts in it and Qt isn't choosing the OEM one. SlickEdit has no control over the character set Qt chooses.

If you can find a font which is strictly an OEM character set, then SlickEdit should work.




beni.falk

  • Junior Community Member
  • Posts: 9
  • Hero Points: 1
Re: rendering of special characters and the draw command
« Reply #6 on: February 13, 2020, 08:47:38 pm »
Thank you very much for the detailed explanation.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2891
  • Hero Points: 436
Re: rendering of special characters and the draw command
« Reply #7 on: February 14, 2020, 12:07:55 am »
For what it is worth, I added Unicode support to the draw command for the next release.  This way you can draw in a Unicode file using the standard Unicode box-drawing characters without having to depend on an ancient ascii Terminal font.  This will ONLY works well if you are using a fixed-width Unicode font, of course.

This also allowed me to add a few more line drawing types (thin lines, rounded corners, dotted lines, thin dotted lines), and I added the ability to move the cursor around without drawing using Ctrl+cursor, so that you can pick up your pen if you need to.

beni.falk

  • Junior Community Member
  • Posts: 9
  • Hero Points: 1
Re: rendering of special characters and the draw command
« Reply #8 on: February 14, 2020, 06:18:31 am »
That sounds awesome.

This is yet another thing that sets
SlickEdit apart.

Thank you very much for the effort.