Dear all, under Windows, I would like to see correct unicode results when running Xqueries under BaseXClient application (xml content is in russian). Could you please help me ?
best regards, Fabrice Etanchaud
Hi Fabrice,
BaseX itself always returns UTF8. Which clients/APIs are you currently using?
C. ___________________________
On Thu, Jan 27, 2011 at 11:49 AM, Fabrice Etanchaud fetanchaud@edital.com wrote:
Dear all, under Windows, I would like to see correct unicode results when running Xqueries under BaseXClient application (xml content is in russian). Could you please help me ?
best regards, Fabrice Etanchaud _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
I beg your pardon, my email was not clear. I am using the org.basex.BaseXClient console (basexclient.bat)
Thanks, Fabrice.
-----Original Message----- From: Christian Grün [mailto:christian.gruen@gmail.com] Sent: jeudi 27 janvier 2011 14:43 To: Fabrice Etanchaud Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] how to get BaseXClient console speak unicode under Windows ?
Hi Fabrice,
BaseX itself always returns UTF8. Which clients/APIs are you currently using?
C. ___________________________
On Thu, Jan 27, 2011 at 11:49 AM, Fabrice Etanchaud fetanchaud@edital.com wrote:
Dear all, under Windows, I would like to see correct unicode results when running Xqueries under BaseXClient application (xml content is in russian). Could you please help me ?
best regards, Fabrice Etanchaud _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
I beg your pardon, my email was not clear. I am using the org.basex.BaseXClient console (basexclient.bat)
No problem. – It might be that your console doesn't correctly display the UTF8 results. Which OS/bash are you using, and what's default encoding of your OS?
Christian
I'm on windows 7... I tried cmd /U with java -Dfile.encoding=UTF8, but this does not work...
Regards, Fabrice
-----Original Message----- From: Christian Grün [mailto:christian.gruen@gmail.com] Sent: jeudi 27 janvier 2011 15:02 To: Fabrice Etanchaud Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] how to get BaseXClient console speak unicode under Windows ?
I beg your pardon, my email was not clear. I am using the org.basex.BaseXClient console (basexclient.bat)
No problem. - It might be that your console doesn't correctly display the UTF8 results. Which OS/bash are you using, and what's default encoding of your OS?
Christian
I'm on windows 7... I tried cmd /U with java -Dfile.encoding=UTF8, but this does not work...
Hm, this is indeed a general terminal issue, which can't be solved from within BaseX. Instead, you could change the output encoding for XQuery results to match the console encoding. An example:
basex -sencoding=850 YourQuery.xq
…or (using the console mode)…
BaseX 6.5.1 [Standalone] Try "help" to get more information.
set serializer encoding=850
SERIALIZER: encoding=850
run YourQuery.xq
....
Hope this helps, Christian
You can easily switch command line's encoding to utf8 using chcp 65001
I just checked and at least German umlauts were displayed correctly, using default codepage 850 they did show up as mojibake.
@Christian: BaseX client crashes in svn head when querying XQUERY 'ä' using utf8, not in 65001 - as querying a database containing umlauts didn't crash the client, it seems to be an error in proceeding the input? Jens Erat » web: www.jenserat.de » email: jens.erat@uni-konstanz.de » phone: 0151 56961126 » weitere und aktuelle Kontaktmöglichkeiten: www.jenserat.de/kontakt
Am 27.01.2011 um 18:23 schrieb Christian Grün:
I'm on windows 7... I tried cmd /U with java -Dfile.encoding=UTF8, but this does not work...
Hm, this is indeed a general terminal issue, which can't be solved from within BaseX. Instead, you could change the output encoding for XQuery results to match the console encoding. An example:
basex -sencoding=850 YourQuery.xq
…or (using the console mode)…
BaseX 6.5.1 [Standalone] Try "help" to get more information.
set serializer encoding=850
SERIALIZER: encoding=850
run YourQuery.xq
....
Hope this helps, Christian _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Leo and me just did some more research on the problem... BaseX seems to be fine, Windows command line (and also PowerShell) seem to have some serious problems with umlauts in UTF-8. Just switch to UTF-8 in powershell and enter one umlaut and send the input and it will crash...
umlauts aren't even passed to java,
System.console().readLine()
returns null - umlauts seem to trigger end of input.
So you will be able to print utf-8 characters, but not input them in queries. Maybe use putty and a local telnet server could help as it seems to be a command line problem... Jens Erat » web: www.jenserat.de » email: jens.erat@uni-konstanz.de » phone: 0151 56961126 » weitere und aktuelle Kontaktmöglichkeiten: www.jenserat.de/kontakt
Am 27.01.2011 um 19:08 schrieb Jens Erat:
You can easily switch command line's encoding to utf8 using chcp 65001
I just checked and at least German umlauts were displayed correctly, using default codepage 850 they did show up as mojibake.
@Christian: BaseX client crashes in svn head when querying XQUERY 'ä' using utf8, not in 65001 - as querying a database containing umlauts didn't crash the client, it seems to be an error in proceeding the input? Jens Erat » web: www.jenserat.de » email: jens.erat@uni-konstanz.de » phone: 0151 56961126 » weitere und aktuelle Kontaktmöglichkeiten: www.jenserat.de/kontakt
Am 27.01.2011 um 18:23 schrieb Christian Grün:
I'm on windows 7... I tried cmd /U with java -Dfile.encoding=UTF8, but this does not work...
Hm, this is indeed a general terminal issue, which can't be solved from within BaseX. Instead, you could change the output encoding for XQuery results to match the console encoding. An example:
basex -sencoding=850 YourQuery.xq
…or (using the console mode)…
BaseX 6.5.1 [Standalone] Try "help" to get more information.
set serializer encoding=850
SERIALIZER: encoding=850
run YourQuery.xq
....
Hope this helps, Christian _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de