What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Character encoding of a file

Character encoding of a file
Author: Message:
tribbium
Junior Member
**


Posts: 34
Reputation: 3
– / Male / Flag
Joined: Jul 2008
O.P. Character encoding of a file
When opening a file, how can you determine what type of character encoding is being used?
Are you and your friends trivia enthusiasts? Download Tribbium! http://www.msgpluslive.net/scripts/view/427-Tribb...ia-Gaming-System)/

Download questions for Tribbium here:
http://www.tribbium.tk
08-05-2009 02:28 PM
Profile E-Mail PM Web Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Character encoding of a file
Yes, just check the first coupel of bytes. For example, the first two bytes of a TFF-16 Unicode file will be 0xFF 0xFE. You can find all the specs you want for all the encoding kinds on the internet.

One thing though: if the file you try to open was simply recorded in an old multibyte format, then there's no header and you cannot know for sure without testing the file visually (I do that with IE myself as it lets you switch the encoding quickly).
[Image: signature2.gif]
08-05-2009 03:19 PM
Profile PM Web Find Quote Report
tribbium
Junior Member
**


Posts: 34
Reputation: 3
– / Male / Flag
Joined: Jul 2008
O.P. RE: Character encoding of a file
thanks, I knew about the BOM but was worried that it may be missing. I expect people to be using notepad at any rate so it'll be fine.

thanks again
Are you and your friends trivia enthusiasts? Download Tribbium! http://www.msgpluslive.net/scripts/view/427-Tribb...ia-Gaming-System)/

Download questions for Tribbium here:
http://www.tribbium.tk
08-05-2009 03:35 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On