mIRC Home    About    Download    Register    News    Help

Print Thread
#157624 27/08/06 12:53 AM
Joined: Aug 2006
Posts: 11
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Aug 2006
Posts: 11
i got a problem with an echo code with $chr(160) and utf-8,

if i write
on ^*:TEXT:*:*:{ haltdef | echo -tmfli2r $target $nick $1- }

i get the line like that: "Die Mac-version heißt X-Chat Aqua."

but if i write
on ^*:TEXT:*:*:{ haltdef | echo -tmfli2r $target $chr(160) $nick $1- }

i get the line written wrong like that: "Die Mac-version heißt X-Chat Aqua." (the mac-version is x-chat aqua) the word heißt should be heißt

is this a bug in mirc 6.2 or is there a way to get this correct ?


sorry for my english smile
#157625 27/08/06 01:05 AM
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Hello! That's not a bug; the $chr(160) is not a valid utf-8 sequence but still a character with an ascii value above 127 - and as a result mIRC assumes that the whole line isn't utf-8 encoded and doesn't decode the rest either. If you want utf-8 to work, make sure not to use any ascii characters above 127 that aren't utf-8 sequences. You can do that by encoding these characters as utf-8 first, for example using $utfencode($chr(160),0) instead of just $chr(160) in this case.


Saturn, QuakeNet staff
#157626 27/08/06 01:43 AM
Joined: Aug 2006
Posts: 11
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Aug 2006
Posts: 11
thanks !

but now mirc slows down frown

Last edited by daGroove; 27/08/06 02:57 AM.

Link Copied to Clipboard