943,655 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1341
  • PHP RSS
Jul 11th, 2007
0

dot prn encoding problem

Expand 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
Similar Threads
Reputation Points: 18
Solved Threads: 9
Junior Poster
w_3rabi is offline Offline
160 posts
since Dec 2006
Jul 13th, 2007
0

Re: dot prn encoding problem

Click to Expand / Collapse  Quote originally posted by w_3rabi ...
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?
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: dont display clicked links ?
Next Thread in PHP Forum Timeline: PHP 4 end of life announcement





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC