Re: [basex-talk] Sending Bytes, Not Strings, To BaseX Using the Ruby Client

2016-02-19 Thread Eliot Kimber
I suspect that using the REST API directly is the answer, although if I understand the Ruby client code, it's using direct socket connections, which would be more efficient. Not a critical issue at the moment but something I need to understand more fully before too long. Cheers, E. Eliot

Re: [basex-talk] Sending Bytes, Not Strings, To BaseX Using the Ruby Client

2016-02-19 Thread Christian Grün
> Hmm. Is there a way to send other encodings to the server via the remote > API? A difficult one for me to answer, because I have never worked with Ruby before… Maybe there are some other users on the list who can reply on this? > I'm on my way to Japan for a workshop where we'll be using my

Re: [basex-talk] Sending Bytes, Not Strings, To BaseX Using the Ruby Client

2016-02-19 Thread Eliot Kimber
Hmm. Is there a way to send other encodings to the server via the remote API? I'm on my way to Japan for a workshop where we'll be using my system and Japanese-language documents are more efficiently stored in UTF-16 so my expectation is that users will either already have documents in that

Re: [basex-talk] Sending Bytes, Not Strings, To BaseX Using the Ruby Client

2016-02-18 Thread Christian Grün
Hi Eliot, For most client bindings, files must indeed be sent in UTF-8, so I guess it’s also the case for the Ruby binding. If the sent bytes are correct UTF-8, everything should work be fine. Christian On Thu, Feb 18, 2016 at 6:08 PM, Eliot Kimber wrote: > This test

Re: [basex-talk] Sending Bytes, Not Strings, To BaseX Using the Ruby Client

2016-02-18 Thread Eliot Kimber
This test document as a non-ascii character '〺' (\u303A), which I added to test handling of multi-byte characters. Ruby and the BaseX client seem to be handling the UTF-8 correctly but UTF-16 didn't. I'm guessing it's Ruby's fault because it's treating the bytes as a string and of course that's

Re: [basex-talk] Sending Bytes, Not Strings, To BaseX Using the Ruby Client

2016-02-18 Thread Eliot Kimber
I turned my UTF-8 file into a UTF-16 file and trying to commit it to BaseX via the Ruby client it did not work: BaseXClient.rb:50:in `execute': Resource "/opt/basex/?" not found. (RuntimeError) Where "?" is some kind of "unrecognized character" indicator Cheers, E. Eliot Kimber, Owner

[basex-talk] Sending Bytes, Not Strings, To BaseX Using the Ruby Client

2016-02-18 Thread Eliot Kimber
I'm implementing server-side git hooks for use in GitLab under Docker where Java is not available (at least that I can see). The hooks load or delete files from databases in BaseX. I'm trying to implement the hooks in Ruby (which is much more pleasant than bash scripting in any case) and I'm