mIRC Home    About    Download    Register    News    Help

Print Thread
Zero-width character #248444 08/10/14 02:08 PM
Joined: Apr 2008
Posts: 10
CyberShadow Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Apr 2008
Posts: 10
Is there a character (or a sequence of such) which will be really rendered as if it wasn't there by mIRC?

I'm maintaining a bot which is announcing GitHub / Bugzilla / etc. activity, and I'm trying to avoid highlighting people in the channel. (It's annoying to be highlighted every time you file a new bug etc.)

To accomplish this, I've tried inserting a zero-width Unicode character in the middle of each word. I've already tried a few variations of the Unicode zero-width space, as well as some Unicode meta-characters such as the ones which change RTL directions. However, all of these still show up in mIRC as a narrow space, messing with the kerning and making the line look weird.

I've also tried to insert formatting (color/bold/etc.) characters, but these do not break highlighting in mIRC.

Last edited by CyberShadow; 08/10/14 02:10 PM.
Re: Zero-width character [Re: CyberShadow] #248445 08/10/14 02:15 PM
Joined: Jul 2006
Posts: 3,588
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,588
http://www.fileformat.info/info/unicode/char/200B/index.htm

Code point 8203, $chr(8203)


I didn't finish reading your post, I see you already tried that, why doesn't that work for you, because it works for me on mIRC 7.36, using the font verdana.

Last edited by Wims; 08/10/14 02:19 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Zero-width character [Re: Wims] #248447 08/10/14 02:29 PM
Joined: Apr 2008
Posts: 10
CyberShadow Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Apr 2008
Posts: 10
Here's how it looks for me with Verdana 8 (without and with the ZWS):

The difference is subtle, but it's distracting when every word has this small break in the middle.

Other channel members have complained about this as well, so it's not just me...

Re: Zero-width character [Re: CyberShadow] #248448 08/10/14 02:34 PM
Joined: Jul 2006
Posts: 3,588
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,588
Oh ok, I get that subtle difference as well.

Would a $chr(9) work for you?

Last edited by Wims; 08/10/14 02:35 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Zero-width character [Re: CyberShadow] #248846 29/10/14 02:16 PM
Joined: Dec 2002
Posts: 4,590
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,590
Thanks for your post. The display issue is due to the way mIRC adjusts character widths for kerning. The next version will check for zero width characters and will skip the kerning adjustment which will resolve the display issue you are seeing.

Re: Zero-width character [Re: Khaled] #249880 22/12/14 12:40 AM
Joined: Feb 2003
Posts: 2,669
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,669
This issue still exists in v7.38. I have observed it while using Fixedsys and Fixedsys Excelsior fonts.

//echo -a $chr(29) $+ abc $+ $chr(3) $+ 4d $+ $chr(3) $+ 12e $+ $chr(3) $+ 7f $+ $chr(3) $+ 13g $+ $chr(3) $+ hij

Outputs:
abc d e f g hij


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Zero-width character [Re: Raccoon] #249881 22/12/14 12:41 AM
Joined: Jul 2006
Posts: 3,588
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,588
Confirmed here, using verdana, there is a small gap between the 'f' and the 'g'


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Zero-width character [Re: Raccoon] #249896 22/12/14 10:28 AM
Joined: Dec 2002
Posts: 4,590
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,590
Thanks, this is an issue with the way italics support was implemented, it is not related to zero-width characters. The italics issue is on my to-do list.

Re: Zero-width character [Re: Wims] #249898 22/12/14 10:29 AM
Joined: Dec 2002
Posts: 4,590
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,590
Are you referring to Racoon's post or to the original issue? I have not been able to reproduce the zero-width character issue as reported in the original bug report.

Re: Zero-width character [Re: Khaled] #249899 22/12/14 10:32 AM
Joined: Jul 2006
Posts: 3,588
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,588
I am referring to Raccoon's post, he first reported that on IRC and I pointed out this thread, thinking it was related, I thought I would just share it wasn't just fixedsys that was affected, his example using verdana also shows a small gap between 'f' and 'g'


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net