ServerJS/Encodings: Difference between revisions

→‎Class: Transcoder: add sourceCharset/destinationCharset constants
(add implementation recommendations)
(→‎Class: Transcoder: add sourceCharset/destinationCharset constants)
 
Line 45: Line 45:
; [Constructor] Transcoder(from, to)
; [Constructor] Transcoder(from, to)
: Where from and to are the encoding names.
: Where from and to are the encoding names.
; [Constant] sourceCharset
: String containing the (possibly normalised) source charset name.
; [Constant] destinationCharset
: String containing the (possibly normalised) destination charset name.
; [Method] push(byteStringOrArray[, outputByteArray])
; [Method] push(byteStringOrArray[, outputByteArray])
: Convert input from a ByteString or ByteArray. Those parts of byteStringOrArray that could not be converted (for multi-byte encodings) are stored in a buffer. If outputByteArray is passed, the results are ''appended'' to outputByteArray.
: Convert input from a ByteString or ByteArray. Those parts of byteStringOrArray that could not be converted (for multi-byte encodings) are stored in a buffer. If outputByteArray is passed, the results are ''appended'' to outputByteArray.
62

edits