binary conversion problem[Solved]

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
devendra-m
Forum Contributor
Posts: 111
Joined: Wed Sep 12, 2007 3:16 am

binary conversion problem[Solved]

Post by devendra-m »

pack("C*",0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1) should output поЮ║╠А , but it is giving unexpected output.
Last edited by devendra-m on Wed Dec 05, 2007 12:02 am, edited 2 times in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You're giving it integers.
devendra-m
Forum Contributor
Posts: 111
Joined: Wed Sep 12, 2007 3:16 am

Post by devendra-m »

I am trying to read xls file. I found error in binary conversion.
devendra-m
Forum Contributor
Posts: 111
Joined: Wed Sep 12, 2007 3:16 am

Post by devendra-m »

I got the main problem.

The problem is function @file_get_contents($filename) is giving wrong value.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I don't see how file_get_contents() is the culprit, it reads and returns raw data, without any filtration or interpretation.
devendra-m
Forum Contributor
Posts: 111
Joined: Wed Sep 12, 2007 3:16 am

Post by devendra-m »

Problem has been solved
Post Reply