Converting double byte

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SBro
Forum Commoner
Posts: 98
Joined: Tue Sep 30, 2003 10:06 pm

Converting double byte

Post by SBro »

A friend just sent me an email containing the following
I have a file with null characters -X00 every second byte, so I think it is in double byte format. So my question is how do I strip out those bytes?
Can this be achieved using php ? ie. by reading in the characters and doing something to them ? thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

his file is in UTF16.

mb_convert_encoding() should be able to do a translation... or
iconv() may do the translation..
Post Reply