{\bfseries{encoding}} is a simple wrapper around \href{https://github.com/ashtuchkin/iconv-lite/}{\texttt{ iconv-\/lite}} to convert strings from one encoding to another.

\href{http://travis-ci.org/andris9/Nodemailer}{\texttt{ }} \href{http://badge.fury.io/js/encoding}{\texttt{ }}

Initially {\itshape encoding} was a wrapper around {\itshape node-\/iconv} (main) and {\itshape iconv-\/lite} (fallback) and was used as the encoding layer for Nodemailer/mailparser. Somehow it also ended up as a dependency for a bunch of other project, none of these actually using {\itshape node-\/iconv}. The loading mechanics caused issues for front-\/end projects and Nodemailer/malparser had moved on, so {\itshape node-\/iconv} was removed.\hypertarget{md_sfcode_node_modules_encoding_README_autotoc_md8403}{}\doxysection{Install}\label{md_sfcode_node_modules_encoding_README_autotoc_md8403}
Install through npm \begin{DoxyVerb}npm install encoding
\end{DoxyVerb}
 \hypertarget{md_sfcode_node_modules_encoding_README_autotoc_md8404}{}\doxysection{Usage}\label{md_sfcode_node_modules_encoding_README_autotoc_md8404}
Require the module \begin{DoxyVerb}var encoding = require("encoding");
\end{DoxyVerb}
 Convert with encoding.\+convert() \begin{DoxyVerb}var resultBuffer = encoding.convert(text, toCharset, fromCharset);
\end{DoxyVerb}
 Where


\begin{DoxyItemize}
\item {\bfseries{text}} is either a Buffer or a String to be converted
\item {\bfseries{to\+Charset}} is the characterset to convert the string
\item {\bfseries{from\+Charset}} ({\itshape optional}, defaults to UTF-\/8) is the source charset
\end{DoxyItemize}

Output of the conversion is always a Buffer object.

Example \begin{DoxyVerb}var result = encoding.convert("ÕÄÖÜ", "Latin_1");
console.log(result); //<Buffer d5 c4 d6 dc>
\end{DoxyVerb}
 \hypertarget{md_sfcode_node_modules_encoding_README_autotoc_md8405}{}\doxysection{License}\label{md_sfcode_node_modules_encoding_README_autotoc_md8405}
{\bfseries{MIT}} 