Hi Jeff,
Has anyone had experience with storing images (gif, tiff, bmp
or jpg) files on Universe database?
The UniVerse hashed file system is "binary clean" so you can safely store
binary data without needing to convert it to hex strings, etc, to remove
unsupported characters. However, images tend to be large and the hashed file
system, while it works for huge records, is perhaps not really optimised for
these. A directory type file (1 or 19) would be better as the underlying o/s
file system is designed to store large items (and is actually not very good
at small ones).
This is where you meet a problem... The directory file interface is not
binary clean.
An image is just a collection of bytes. Some of these bytes will happen to
look like field marks and will be translated to newlines when the data is
written to the file. When you read it back, ALL of the newlines get
translated to field marks, including those that were originally line feed
characters.
This problem has been around for a very long time but the fix is not
documented very well, if at all. You need to stop the system doing this
character translation. You can do this by setting one of those magic,
undocumented system flags...
ASSIGN 1 TO SYSTEM(1017)
While this flag is set to 1, the character translation of type 1/19 files is
suppressed. Remember to turn it off again with
ASSIGN 0 TO SYSTEM(1017)
when you have read/written your item.
Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/