dot prn encoding problem

Reply

Join Date: Dec 2006
Posts: 160
Reputation: w_3rabi is an unknown quantity at this point 
Solved Threads: 9
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

dot prn encoding problem

 
0
  #1
Jul 11th, 2007
hey
i have this problem giving me a painful headache and sleeplessness

ive got these .prn files which should converted into DB
and these files contain numbers along with arabic characters the problem is the encoding of these characters is not readable
anyone hav an idea how i could convert these files

i already have a script which checks for some characters and dumps the rest which was used before in my company but it is a little bit slow

and prn files BTW are files generated for some kind of printer or something like this
thnx anyway
programming is an art ,only for those who can understand it.
- th3 php wr3nch -
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 1,084
Reputation: digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice 
Solved Threads: 66
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Veteran Poster

Re: dot prn encoding problem

 
0
  #2
Jul 13th, 2007
Originally Posted by w_3rabi View Post
hey
i have this problem giving me a painful headache and sleeplessness

ive got these .prn files which should converted into DB
and these files contain numbers along with arabic characters the problem is the encoding of these characters is not readable
anyone hav an idea how i could convert these files

i already have a script which checks for some characters and dumps the rest which was used before in my company but it is a little bit slow

and prn files BTW are files generated for some kind of printer or something like this
thnx anyway
What encoding are the .prn files saved as?

What do you mean by converted to DB? Do you want to save the data in the files into a database field?

PHP should be able to read the binary data from the file, and then save it to a binary field in the db without changing any data.

If you wanted to display the file contents however with PHP, or have PHP parse the file contents, you'll have to make sure the parsing takes into account the encoding of the file, so that you do not corrupt the file. Having PHP parse the file is not needed however to insert all the file contents into a database field.

Are you trying to index the .prn file contents in the db? or just save the file contents into fields?
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1121 | Replies: 1
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC