Dossy,
thanks for the quick response. I didn't find any issues in getting it
working ... even splitting the components across different servers.
And possibly I didn't explain my issue adequately as what I can do
successfully at the moment is
- have an image uploaded via web page to frontend server (which saves
it as temp file)
- open and load the temp file as binary into a variable and send that
to the sob server with nsob.put
-- This stores it ... but not in binary format (i believe) as I can't
view that image with some other image viewer, but I can view it in
web page using nsob.get. So I think it's already in utf-8 format,
which is why it works.
But what doesn't work is
- open and load the temp file as binary into a variable and send that
to the sob server with nsob.copy
-- This stores it ... and in the original binary format as it's
viewable with other image viewers. But is not viewable using nsob.get
I really need to keep the binary format when it's stored by the sob
server ... so the images can be viewed by other apps ... and also be
viewable using nsob.get. Where it seems to be failing at the moment
is, even though the sob server stored the data as binary (using
nsob.copy), it doesn't seem to be able to read it in and return it
using nsob.get. So I think nsob.get needs to be able to convert from
binary to utf-8 to successfully return it ... ??
Thanks
Damien O'Rourke
[EMAIL PROTECTED]
On 23/10/2007, at 10:11 AM, Dossy Shiobara wrote:
On 2007.10.23, Damien O'Rourke <[EMAIL PROTECTED]> wrote:
I've been experimenting with the components in nsdci, most
particularly the sob service, and am impressed with it.
I'm SO glad you were able to get it working! I keep hearing "we need
documentation first" from people, but apparently there was enough for
you to get it going, at least.
What I'm struggling with though is if I store an image file to the
sob with sob.copy and then try and retrieve it later with nsob.get,
it only returns the first 4 or 10 bytes of the file.
SOB isn't encoding-aware and is actually really naive--it doesn't
handle
binary data well.
A work-around that may work is to use Tcl's [encoding] explicitly,
i.e.:
nsob.put $id [encoding convertto utf-8 $value]
I believe if you do this, you shouldn't need to do anything special
when
you nsob.get, as Tcl internally expects the data to be utf-8.
-- Dossy
--
Dossy Shiobara | [EMAIL PROTECTED] | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.