You can convert a coldfusion string to a Java array of bytes using the .getBytes hidden function
<Cfset variables.aBytes = variables.cString.getBytes() />
Thursday, January 24, 2008
Thursday, January 3, 2008
Converting russian characters too URL hexadecimal characters
The binary code should be of the following format
// The position in the Unicode table tells us how many bytes are needed.
// Note that if we talk about first, second, etc. in the following, we are
// counting from left to right:
//
// Position in | Bytes needed | Binary representation
// Unicode table | for UTF-8 | of UTF-8
// ----------------------------------------------------------
// 0 - 127 | 1 byte | 0XXX.XXXX
// 128 - 2047 | 2 bytes | 110X.XXXX 10XX.XXXX
// 2048 - 65535 | 3 bytes | 1110.XXXX 10XX.XXXX 10XX.XXXX
// 65536 - 2097151 | 4 bytes | 1111.0XXX 10XX.XXXX 10XX.XXXX 10XX.XXXX
The binary code should be of the following format
// The position in the Unicode table tells us how many bytes are needed.
// Note that if we talk about first, second, etc. in the following, we are
// counting from left to right:
//
// Position in | Bytes needed | Binary representation
// Unicode table | for UTF-8 | of UTF-8
// ----------------------------------------------------------
// 0 - 127 | 1 byte | 0XXX.XXXX
// 128 - 2047 | 2 bytes | 110X.XXXX 10XX.XXXX
// 2048 - 65535 | 3 bytes | 1110.XXXX 10XX.XXXX 10XX.XXXX
// 65536 - 2097151 | 4 bytes | 1111.0XXX 10XX.XXXX 10XX.XXXX 10XX.XXXX
Subscribe to:
Posts (Atom)