mIRC Home    About    Download    Register    News    Help

Topic Options
#186173 - 18/09/07 03:23 PM UTF-8 display problem
Tewl Offline
Ameglian cow

Registered: 31/01/03
Posts: 20
Loc: United States
I chat a server the has UTF-8 support and I noticed a display issue in my theme today while trying to send pm's to a user.

The users name was -¬§Chuck¬§- which when decoded looks like -§Chuck§-

The problem comes wehn my theme goes to echo messages into the query window.

.echo $active $me $+ 11: $1-

and

.echo $nick $nick $+ 11: $1-

ect...

only the $1- data will show in the query window for myself and the received messages are displayed in the status window without the name or colon again.

I tried opening a window and doing "//echo $active test" and i get: * /echo: insufficient parameters

But! if I do "//echo $active test test" it returns "test", it is removing the first word of input.


Edited by Tewl (18/09/07 03:33 PM)
_________________________
Tewlzbox

Top
#186204 - 19/09/07 01:01 AM Re: UTF-8 display problem [Re: Tewl]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
if echo $active test test only echo's test, that doesn't seem like a UTF-8 problem to me... what are your settings in alt-o -> irc -> messages (multibyte editbox, display, etc.)? That will help someone reproduce it, because I cannot reproduce the //echo $active test thing
_________________________
- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Top
#186207 - 19/09/07 01:21 AM Re: UTF-8 display problem [Re: Tewl]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
It sounds as though you have "echo" aliased so that it's removing the first word.

Or, perhaps more likely, you have an on INPUT event that handles your theme and that's what is messed up.


Edited by Riamus2 (19/09/07 01:22 AM)
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#186243 - 19/09/07 10:32 PM Re: UTF-8 display problem [Re: Riamus2]
Tewl Offline
Ameglian cow

Registered: 31/01/03
Posts: 20
Loc: United States
Yes I have display and encode enabled on the fonts, all the multibyte display,editbox and jsis ect.. enabled.

No I do not have an echo alias and I seriously doubt it has anything to do with my INPUT or TEXT events in my theme.

They are pretty basic:

Code:
on ^*:TEXT:*:?: {
  .echo $nick $+($nick,11: $1-)
  .halt
}
on *:input:?: {
  if ($left($1-,1) != /) && ($comchan($active,0) > 0) {
    .whisper $comchan($active,1) $active $1- 
    .echo $active $+($me,11: $1-)
    .halt
  }
}


I do not seem to have this issue with any other users that have utf-8 formatting in their nicknames. I am absolutely certain it has something to do with the characters in the mentioned nickname.


Edited by Tewl (20/09/07 01:04 AM)
_________________________
Tewlzbox

Top
#186247 - 19/09/07 11:02 PM Re: UTF-8 display problem [Re: Tewl]
Tewl Offline
Ameglian cow

Registered: 31/01/03
Posts: 20
Loc: United States
To add a more visual response i did 10 tests on the query window and created an image of the input and results.

http://i90.photobucket.com/albums/k252/Tewl187/mirc.png
_________________________
Tewlzbox

Top
#186251 - 20/09/07 12:00 AM Re: UTF-8 display problem [Re: Tewl]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
That does seem to be a problem with the UTF-8... what network is that? I don't know which networks allow UTF nicks.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#186258 - 20/09/07 01:02 AM Re: UTF-8 display problem [Re: Riamus2]
Tewl Offline
Ameglian cow

Registered: 31/01/03
Posts: 20
Loc: United States
It's irc.buzzen.net, but the server is not your standard IRC server. It is IRCx and requires a special authentication method to connect. If you are interested in getting on and seeing what I am talking about check their forums on buzzen.com and sign up for a free account.
_________________________
Tewlzbox

Top
#186271 - 20/09/07 08:20 AM Re: UTF-8 display problem [Re: Tewl]
Khaled Offline


Planetary brain

Registered: 04/12/02
Posts: 4379
Loc: London, UK
Since the nickname begins with a - switch prefix, when you use it with /echo the - is parsed for switches and the next word is used as the window name. If the IRC server you are using allows nicknames to begin with the - character (standard IRC networks do not allow this) you would need to cater for this in your scripts.

Top
#186272 - 20/09/07 08:35 AM Re: UTF-8 display problem [Re: Khaled]
Tewl Offline
Ameglian cow

Registered: 31/01/03
Posts: 20
Loc: United States
doh! I didn't even think about that =\
_________________________
Tewlzbox

Top
#186284 - 20/09/07 02:38 PM Re: UTF-8 display problem [Re: Tewl]
Tewl Offline
Ameglian cow

Registered: 31/01/03
Posts: 20
Loc: United States
I was looking into finding a way to cater to it in my script, the only ideas can come up with are:

a) Making the query the active window when a message is received and then just doing echo -a switch. This could get messy and may not always be accurate.
or
b) Replacing the characters in the server data with another character that would not cause this problem. This could be an eyesore and generally a lot more to process.

I'm not a great solutions developer, I know :@

Anyways, I noticed that you can retrieve a window id and handle using the $query().wid and $query().hwnd identifiers. I went through the help file and there is no way to echo into a window given those 2 parameters. I was wondering if that would be a possible to add, if I haven't over looked it.


Edited by Tewl (20/09/07 02:42 PM)
_________________________
Tewlzbox

Top
#186287 - 20/09/07 02:46 PM Re: UTF-8 display problem [Re: Tewl]
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
You can just use existing switches in /echo other than -a. Chances are you want them anyway, you just don't know it yet. For example:

echo -mbflirt $nick $nick $+ 11: $1-

If you don't know what these specific switches do, type /help /echo in any mirc window.
_________________________
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Top
#186288 - 20/09/07 03:27 PM Re: UTF-8 display problem [Re: qwerty]
Tewl Offline
Ameglian cow

Registered: 31/01/03
Posts: 20
Loc: United States
Thanks qwerty, that sorted the problem for me.
_________________________
Tewlzbox

Top