954,136 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

dot prn encoding problem

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

w_3rabi
Junior Poster
160 posts since Dec 2006
Reputation Points: 18
Solved Threads: 9
 

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?

digital-ether
Nearly a Posting Virtuoso
Moderator
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You