mIRC Home    About    Download    Register    News    Help

Print Thread
T
Tohe
Tohe
T
This one has got me beat...

I quite often type in Māori using what we call macrons above vowels such as the one above the a in Māori. I have Māori set as the default language on my computer and to get a character with a macron, all I have to do is type ` and then the vowel (such as `a which produces ā)

It works in every single program I use perfectly... EXCEPT for mIRC

In mIRC...
ā diplays as â
ē displays as ç
ī displays as î
ō displays as ô
ū displays as û

It not only displays this way for me, but also the other person or channel I am typing to.
I do have mIRC set to display and encode UTF-8

Is there something else I haven't set correctly???

There is no other program I use that gives me this result and although the â î ô and û look similar to ā ī ō and ū, they are just not correct.

HELP?

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
did you turn on the multibyte editbox, multibyte display and utf-8 display in Alt+O -> IRC -> Messages?

You'll also probably want to turn on Font Linking.

T
Tohe
Tohe
T
Hi argv0

Thanks for the reply. Yes, all of these are turned on. I tried turning them off and back on again, but still the same.

Cheers
Tohe

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
You can try the $utfdecode identifier but is locked by default via mirc options -> expand Other - uncheck Decode
You need to unlock (uncheck) it before having this script below to work:
Code:
on *:INPUT:*:{
  if (/* !iswm $1) && (!$ctrlenter) {
    say $iif($isutf($1-),$utfdecode($1-),$1-) | halt
  }
}
on ^*:TEXT:*:*: {
  echo -amt $+(<,$iif($left($nick(#,$nick).pnick,1) $&
    isin $prefix,$v1),$nick,>) $iif($isutf($1-),$utfdecode($1-),$1-) | halt
}

Last edited by Tomao; 02/04/09 12:41 AM.
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
@Tomao
You need to check if the text is utf-"conform" first, like $iif($isutf($1-),$utfdecode($1-),$1-) - see here

@Tohe
If you enter ā ī or ō in the text editbox, do you "see" these chars in the editbox as they should be (as macrons), or do you see them as â î and ô (with the caret/circumflex)?
(Note that you might need to copy-paste this phrase into mIRC, at least my browser doesn't display the chars utf-encoded here in the forum)

If it's the latter, there's nothing wrong with the UTF-processing of text you send or receive. Instead the input itself isn't interpreted as it should be...

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
Thanks, Horstl. And the $utfdecode does work to output the correct macrons: &#257; &#275; &#299; &#333; &#363;

T
Tohe
Tohe
T
Originally Posted By: Horstl

If you enter ā ī or ō in the text editbox, do you "see" these chars in the editbox as they should be (as macrons), or do you see them as â î and ô (with the caret/circumflex)?

If it's the latter, there's nothing wrong with the UTF-processing of text you send or receive. Instead the input itself isn't interpreted as it should be...


It's the latter... In the editbox I see the characters as â î and ô (with the caret/circumflex)

Is there anything I can do about this? This is the only application that has this problem frown frown frown

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
Did you even try the $utfdecode

T
Tohe
Tohe
T
Hi Tomao

Originally Posted By: Tomao

Code:
on *:INPUT:*:{
  if (/* !iswm $1) && (!$ctrlenter) {
    say $iif($isutf($1-),$utfdecode($1-),$1-) | halt
  }
}
on ^*:TEXT:*:*: {
  echo -amt $+(<,$iif($left($nick(#,$nick).pnick,1) $&
    isin $prefix,$v1),$nick,>) $iif($isutf($1-),$utfdecode($1-),$1-) | halt
}


I tried using this, but not only did it not display the correct characters with macrons, it started mixing conversations from one channel with another!
Not sure what happened there!

(Decode was already unchecked)


Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
@Tomao
This was the point of my previous post - if mIRC (or more likely: windows) don't put the "right" (desired) chars in the editbox in the moment of text input, how should forced coding of these "wrong" chars, in the moment of sending text, fix it?


@Tohe
So your problem is that the same keystrokes create different chars in e.g. the url editbox of your webbrowser or a text editor, and in the editboxes of mIRC.
While it won't solve your problem in principle - you *should* be able to type in every application with the default keyboard layout - it could be a workaround to assign M&#257;ori to a keyboard layout shortcut, and press this shortcut inside mIRC (once for every mIRC session).
Note that with these shortcuts you don't switch your keyboard layout for the whole system but for a single application (at least on WinXP). Example: I sometimes need to switch between a german ("qwertz") keyboard layout and an english ("qwerty") keyboard layout. German is the default keyboard setting on my system. If I switch now to the english keyboard layout in Notepad via shortcut, mIRC is still set to the german keyboard, thus I have to press the shortcut for English there as well to set mIRC to English. And if I switch mIRC back to German, Notepad is still set to English.

In WinXP you find the shortcut option at: "Regional and Language Options" > "Language" > "Details" = "Text Services and Input Languages" > "Key Settings"

Hope it's working and sufficient, as I don't have further ideas at the moment... smile


Link Copied to Clipboard