From: chap at anastigmatix.net (Chapman Flack) Date: Wed, 23 Sep 2015 19:39:49 -0400 Subject: [Pljava-dev] Issue 21 Re: PL/java kills unicode chars? In-Reply-To: <55FE2AD0.1040305@anastigmatix.net> References: <55FE2AD0.1040305@anastigmatix.net> Message-ID: <56033845.9090007@anastigmatix.net> Question (mostly for Thomas), In working on issue 21, would it be acceptable to add specialized calls (in JNICalls or elsewhere), for calling up into a very select few Java methods without releasing and reacquiring the threadlock? such as... CharSequence.toString() java.nio.Buffer.position() java.nio.CharBuffer.wrap(CharSequence) java.nio.charset.CharsetDecoder.decode(ByteBuffer) java.nio.charset.CharsetEncoder.encode(CharBuffer,ByteBuffer,boolean) They could be called rather often ;) and the monitor operations could be overkill; no point giving another thread access to the backend during such a simple operation. I like your comments in the source saying "Would be nice if a direct conversion from UTF16 was provided." This task is like some kind of "you can't get there from here" Vaudeville routine. Between what's provided in PG and what's in Java there are at least three different APIs to approach the problem with, and for *each one* there seems to be *one* feature lacking that necessitates going the long way around, too many pallocs/copies. etc. Or Kafka. It could be Kafka. -Chap