Adium
Dock Icons Emoticons Contact List Styles Message Styles Sound Sets AppleScripts Status Icons Service Icons Menu Bar Icons Plugins Miscellaneous All
MSN to Adium Log Converter

MSN to Adium Log Converter

Submitted By fuyutsuki

Description

Migrating to Adium from MSN Messenger for Mac?

Don't want to lose your conversation histories?

This script converts saved messages from MSN to Adium. Drag and drop full folders of conversations, select the aliases, and have the new logs created right in your Adium log folder.

As this is an Applescript (and MSN message format is tricky to convert) it can take a while to convert a lot of saved conversations. Large collections of saved messages take a long time ... around 2 minutes per megabyte on an 867MHz G4. But you only have to do it once!


New in Version 1.1:
- Implemented Unicode character set conversion (from UCS-2 to UTF-8), so should work with all
languages. This hasn't yet been verified, so feedback would be appreciated.

New in Version 1.2:
- Discovered (with actual test data - yes, I tested my code...) that Adium's log files don't use UTF-8;
They are regular ASCII. International characters are represented by HTML entities. This version
now does that conversion instead, and my test data shows up correctly in Adium's log viewer.

Images

Comments

You can reply to individual comments by clicking the "Reply" link next to each.

# by pakmn on 01/15/06 at 20:35:24

There is a problem with the import of chats when there are emoticons in the alias (short name). The script imports ?:) for a regular smiley face :) . The ? screws up some UTF-8 formating and Adium can't read the logs properly (fix is to re-save the file in text wrangler or bbedit) The original logs were from MSN V. 5

This only happens with emoticons in the users alias name. It must be formatted differently in MSNs logs. Is there some way to fix it?

# by pakmn on 01/15/06 at 20:44:12

OK! well I just realized that the symbol i was trying to paste up wouldn't show up the "?" should be a black diamond with a white question mark inside it

I also found another instance of the import screw up, however Adium is able to view the log this time because the UTF-8 formatting isn't affected
.....for the heart emoticon (L) the script imports ‡(L)
I don't know what that symbol is but it looks like two + signs stacked on top of each other

# by pakmn on 01/15/06 at 20:50:43

same symbol for the star (*).... ‡(*)

# by fuyutsuki on 01/16/06 at 12:13:20

Yes. That symbol is called diesis, it's coming up because of the way Applescript interprets non standard characters in MSN logs.
http://en.wikipedia.org/wiki/Dagger_%...pography%29

I had a bunch of those come up in my conversion and basically ignored them. Seemed to convert fine. But I'll alert the coder.

# by quatre on 01/16/06 at 12:18:23

Actually, it is because the MSN logs are a binary file format, and don't store the text as UTF-8. They use a format that I'm not familiar with (16 bits per character - I think this is wchar, but I don't know much about that encoding), so all my scripts do is basically ignore the most significant byte (except in a few special cases - those that I found in my own logs).

I can fix this (to properly translate to UTF-8) if anyone can point me in the direction of some suitable documentation.

# by quatre on 01/17/06 at 03:20:33

OK, I've now read some material on UCS-10646 and Unicode, and now I recognise that the encoding used in Messenger is UCS-2 (UTF-16), which I've now made the parser able to convert into UTF-8. After some tests with some Greek, I've validated that the conversion works, but unfortunately Adium's log viewer incorrectly interprets them as Mac Roman, like how TextEdit does if I open it with it (unless I explicitly tell it to open everything as UTF-8). I tried manually adding an HTML encoding line to the top of the log, which causes Safari to be able to show the characters properly, but Adium's log viewer ignores it.

I would appreciate it if someone who routinely uses Unicode characters in their Adium conversations could post me a snippet of one of their logs, so I can see how it identifies the encoding. Or maybe it doesn't, and it's just the current locale set in the OS that's causing the problem…

I'll get Fuyutsuki to upload this new version once he next comes online (version 1.1).

# by quatre on 01/17/06 at 03:39:15

OK, sorted it. The Adium logs don't use UTF-8 - they represent Unicode characters using HTML entities such as Λ (hopefully that will be escaped by this wiki). So my test logs now work in Adium. Hopefully it will work for you guys too.

Again, I'll get Fuyutsuki to upload it (now version 1.2).

# by quatre on 01/17/06 at 04:06:58

The issue with the daggers († and ‡) is to do with Messenger's log formats. Some versions represent the end of each conversation by an invalid Unicode sequence, whereas more recent versions instead mark the sender line with a (different) invalid Unicode character in the middle of the "Display name says:". And some other versions do neither of these, and instead mark the beginning of the first line of conversation with a sequence of daggers. My parser can't determine beforehand which type it will encounter, so instead expects any. There may be other formats which I haven't looked at in a hex editor. Most of the time this works fine, but sometimes a mixup can occur, which leaves in some of those invalid Unicode characters, or extra daggers. I haven't got a fix for this - the Messenger file formats are just too idiotic to parse in an easy manner. This is also why the search feature in Messenger is so slow.

# by pakmn on 01/27/06 at 20:12:06

Is there a way to change the fact that this script uses the display name as well as the email address as the "header" to each line of a conversation. To something like just the email address, (like adium does) and get rid of the display name completely. Like an option at the start... "Would you like to use display names and/or email addresses".

Oh and the display format of the time bugs me too, could you make it 12 hr like adium?
I tried looking at the code to change it but I'm no good with applescript

Thanks

# by enzofsilva on 05/25/09 at 15:54:20

Is there a tool that does the opposite operation: convert conversations from Adium to Microsoft Live Messenger for the Mac? (I just got the new beta (that has audio/video) and wanted to try and play with it for a while... but wanted aqll my Adium convos in there too...

thanks...

# by vogt on 02/10/10 at 15:45:46

hi there!
i followed the instructions on how to do this, but when i finally drop the msn account folder onto the script icon, i get the following error message:

"Couldn't find the worker scripts inside this bundle - make sure to run this script directly (not inside another application, like from Script Editor)"

i'm running mac os x 10.6.2 -- the msn logs should be from spring / summer 2006, so i guess msn 5 client.

any ideas on how to solve this?
thanks

# by fuyutsuki on 02/10/10 at 17:29:55

Unfortunately, the script is a relic from a time long since past. Microsoft updated the binary format of their chat transcripts several years ago, rendering this converter inoperable. And as you have just discovered, it no longer even runs on Snow Leopard.

# by vogt on 02/11/10 at 16:09:18

hi fuyutsuki,
luckily i have an old ibook g4 with 10.4 around.
i tried the script there, and it detects the logs, and reports a success in converting, but when i look at them they are all 0kb big and totally empty.
so you have a clue what the reason could be?

i have neither adium nor msn messenger installed, but later installed an old adium from late 2005, as that was the time the script was released, but it can't log into msn anymore...

the messenger los are from january to august 2006, so they are in an older format (i didn't use microsoft messenger since then).

any clues?
thanks

# by vogt on 02/11/10 at 16:11:40

ps: i also tried this one in virtualbox under win xp -

http://www.logconverter.com/

it detects the msn logs, but doesn't convert them (although it reports that converion took place). -> empty folders...

# by fuyutsuki on 02/11/10 at 19:10:00

Looking at the script code, I think that must mean it didn't understand the contents of the MSN log files. There are more than 10 different binary formats that I've seen for them, and even more variants based on country. It would take a fair amount of time to make sense of it, and unfortunately I don't have that at the moment. Apologies.

Post a New Comment

You must be logged in to post comments.

Install | Download
52.84kb (2819 downloads)

12345
3.20 / 18 votes
Current Version: 1.2
Last Updated: 01/17/06
Credits:
Written by Mark Muir