Page 1 of 1

Replacement of middle dot

Posted: 12 Jun 2016 07:26
by highend
Don, in v16.80.0001
* Info Panel | Raw View: Replaced substitution character (for non-displayed
low ASCII chars) "mid dot" character by normal dot. The mid dot is no good
on some code pages, and it does not play easily with HTML and other ASCII
contexts.
* Info Panel | Raw View: Now many more lower ASCII (< ord 32) are shown
unsubstituted.
There is one case where I find this change totally disturbing:
In the "stepping through a script" window

When a regexreplace / match produces empty matches that were represented through the middle dot
before they are now displayed as normal dots. Could you make an exception from the new rule
and display these as middle dots again, please (only for this window)?

v16.80.0000
16.80.000.png
v16.80.0001
16.80.001.png

Re: Replacement of middle dot

Posted: 12 Jun 2016 10:01
by admin
Got some code? I'm a regexp idiot.

Got it. :)

Re: Replacement of middle dot

Posted: 12 Jun 2016 10:04
by highend

Code: Select all

 $list1 = <<<HEREDOC
x?tag1
a?tag1
b?tag1
HEREDOC;

    $matches = regexmatches($list1, "^.*\?tag1", "<crlf>");
    step; // DEBUG
    $list = regexreplace($matches, "\?.*");
Just execute this one. It'll display what's on the second screenshot from my last post. And this is... Em, hard to grasp, because you think it captured dots... which are in fact empty matches (formerly represented by middle dots)

Re: Replacement of middle dot

Posted: 12 Jun 2016 10:32
by admin
OK, I'll try the BEL character (ASCII 7):
https://en.wikipedia.org/wiki/Bell_character

It looks like a big black middle dot in the fonts I tested (Segoe and Courier).
I just hope it does not ring the bell.

Re: Replacement of middle dot

Posted: 12 Jun 2016 10:51
by highend
I just hope it does not ring the bell
:)

Re: Replacement of middle dot

Posted: 12 Jun 2016 12:41
by highend
v0204 looks fine, thanks!
0206.png

Re: Replacement of middle dot

Posted: 12 Jun 2016 13:54
by PeterH
Works:fine.

Wouldn't it also be fine to do the same in Preview, so we can distinguish unprintables (like chr(00)) from dots?
(That's why I loved the middle-dot :titter: )

Re: Replacement of middle dot

Posted: 12 Jun 2016 14:19
by admin
Well, dot is a bit of a defacto standard here when I think of various Hex Viewers. OTOH, it's certainly not a good standard. So I'm open for improving it.

Now, what about this:
http://www.fileformat.info/info/unicode ... /index.htm

Re: Replacement of middle dot

Posted: 12 Jun 2016 14:22
by Marco
admin wrote:Well, dot is a bit of a defacto standard here when I think of various Hex Viewers. OTOH, it's certainly not a good standard. So I'm open for improving it.

Now, what about this:
http://www.fileformat.info/info/unicode ... /index.htm
Imho it's perfect.

Re: Replacement of middle dot

Posted: 12 Jun 2016 14:34
by admin
I thought so, too, but there is a problem: It does not look good in small font size. IMO this middot is still the best. And I found one that should be safe with codepages (U+2219):

Re: Replacement of middle dot

Posted: 12 Jun 2016 15:35
by Marco
It doesn't look bad to me...

Re: Replacement of middle dot

Posted: 12 Jun 2016 15:39
by admin
I made it customizable. Next beta you can tweak:

Code: Select all

LowAsciiReplacementChar=� 

Re: Replacement of middle dot

Posted: 12 Jun 2016 16:15
by Marco
:tup: