mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 4
Z
zati Offline OP
Self-satisified door
OP Offline
Self-satisified door
Z
Joined: Dec 2002
Posts: 4
It seems there is a probleme reading some special characters with $read.

download this sample text file

Then type
Code:
//echo * $read(file location,2)


There will be missing characters in mIRC 7


Same problem using /loadbuf and $line

Last edited by zati; 16/04/10 10:50 PM.
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Confirmed with 7.01 / win7 home premium 64bit.

Copy/pasteing the same text into mIRC works fine, so it seems like the problem is definitely $read

Joined: Apr 2010
Posts: 11
C
Pikka bird
Offline
Pikka bird
C
Joined: Apr 2010
Posts: 11
Originally Posted By: hixxy
Confirmed with 7.01 / win7 home premium 64bit.

Copy/pasteing the same text into mIRC works fine, so it seems like the problem is definitely $read

Confirmed 7.01 windows vista 32

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
mIRC v7.x is displaying boxes here, instead of the bullet point and angled characters. Whether you see the boxes may depend on your selected font.

The reason that mIRC v7.0 displays boxes for these characters is that mIRC is now a Unicode application and the characters you are using, in the range 007F to 00FF, are codepage-specific. Some of them are even non-printable and have no glyphs associated with them.

To make sure that all characters appear the same to all users, you should use Unicode characters and then save your file as UTF-8. mIRC will then read the UTF-8 text from the file and will display the same text to all users.

Last edited by Khaled; 17/04/10 11:34 AM.
Joined: Dec 2002
Posts: 4
Z
zati Offline OP
Self-satisified door
OP Offline
Self-satisified door
Z
Joined: Dec 2002
Posts: 4
Thank you for your answer, even if I think mIRC should continue to work with non-unicode files for read/write commands.

I converted my previous sample file to utf-8 using Notepad++.
The resulting file is here

The result of $read() is now correct, but I still have a problem with /loadbuf

Code:
/loadbuf -tmts @test c:\b.mts


displays * /loadbuf: invalid parameters.

Last edited by zati; 17/04/10 05:02 PM.
Joined: Nov 2003
Posts: 18
Pikka bird
Offline
Pikka bird
Joined: Nov 2003
Posts: 18
I had several of these special characters in my aliases.

When I noticed that the characters were not appearing on the screen I looked at my aliases and the characters were no longer in the aliases.

At some point mIRC must have saved the alias file because opening it in a text editor shows the special characters to be absent.

As mentioned previously, pasting the characters works OK.

mIRC 7.01, Vista Ultimate x64 (SP2)

Edit: After copying an alias directly from the mIRC Script Editor and pasting into UltraEdit the missing special character is shown as a "?".

Edit #2: Perhaps my aliases had already been mangled by 7.0. After re-inserting the • bullet character into the aliases, quitting and restarting mIRC, the characters where there.

No problems.

Last edited by Zyxak; 17/04/10 06:53 PM.

=Z=
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
As Khaled said, this behaviour is intentional.

In versions past, the interpretation of codepoints between 128-255 was subject to the codepage settings in mIRC's font dialog. You are likely expecting those bytes to be intepreted as per the Windows-1252 "Western" codepage, as was the default in versions up to 6.35. This is no longer the case - mIRC has dropped support for the various codepages and has standardized around Unicode, in which the meanings of codepoints 128-255 are identical to those in the older Latin-1 codepage. To be clear here, it was by far never guaranteed that codepoints in the 128-255 range would appear the same for every user.

All of the characters you were using previously are still available in Unicode, you'll just need to find them and update your scripts accordingly. This may be as simple as copying/pasting them from unicode-aware sources. All IRC clients that have UTF-8 support enabled (which includes default mIRC installs from, I think, version 6.2) will be be able to view these characters.

A bigger problem, I think, is that users of non-Latinized languages may find that the new mIRC version does not 'correctly' display messages from friends who are using clients that do not encode characters 128-255 as UTF-8, and without the codepage settings they will be unable to fix this locally. Such clients include mIRC 6.35, which had outgoing UTF-8 encoding turned off by default.


Link Copied to Clipboard