git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@493 f203690c-595d-4dc9-a70b-905162fa7fd2tags/jackcess-1.2.2
@@ -1386,13 +1386,15 @@ public class Column implements Comparable<Column> { | |||
/** | |||
* @param text Text to encode | |||
* @param db relevant db | |||
* @param charset database charset | |||
* @return A buffer with the text encoded | |||
*/ | |||
public static ByteBuffer encodeUncompressedText(CharSequence text, | |||
Charset charset) | |||
{ | |||
return charset.encode(CharBuffer.wrap(text)); | |||
CharBuffer cb = ((text instanceof CharBuffer) ? | |||
(CharBuffer)text : CharBuffer.wrap(text)); | |||
return charset.encode(cb); | |||
} | |||