Hello!

I'll try to elaborate. :-)

My search function is as basic as is in your test. But you can see the output at:
http://tomcat.eki.ee/vadja/korpus/%F0%9F%98%83

Can it be a problem or setting of Tomcat or anything in between the browser and BaseX, for example Nginx?

Thank you for working your ass off while Christian is on vacation :-D
Kristian K


28.08.2015 13:43 Dirk Kirsten kirjutas:
Hello Kristian,

could you please elaborate what you mean by "decode"? Normally, you should not have to do anything, this is just an encoding and your $query variable should be able to handle UTF-8.

I just tested this to see if there might be a bug, but if I do e.g.
declare
  %rest:GET
  %rest:path("test/{$query}")
  %output:method("text")
function _:test(
  $query  as xs:string
) {
  $query
};

and access it at
http://localhost/restxq/test/%F0%9F%98%83

I get back my intended smile face.

So it might help if you describe what does not work as you expect it to. Because we want you to have a smiley face as well ;)

Cheers
Dirk

PS: At other people asking on the mailing list, Christian is currently on vacation and I can't answer stuff I know next to nothing about (e.g. WebDAV). So please be patient.

On 08/28/2015 12:31 PM, Kristian Kankainen wrote:
Hello!

I have a simplistic search path as %rest:GET %rest:path("search/{$query}") for an application. It all works fine with ASCII query string, but I can't figure out how to decode the string when It contains utf-8 characters.

Best wishes
Kristian K

-- 
Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
|   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
`-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22