MessageManager.fromUnicode Member

Syntax

object.fromUnicode(msg, charset);

Arguments

ArgumentSummary
msg
charset

Returns

Remarks

See Also

Source Code

function mm_fromunicode(msg, charset)
{
if (!charset)
return msg;
if (this.enableHankakuToZenkaku && (charset.toLowerCase() == "iso-2022-jp"))
msg = this.convertHankakuToZenkaku(msg);
try
{
// This can actually fail in bizare cases. Cope.
if (charset != this.ucConverter.charset)
this.ucConverter.charset = charset;
if ("Finish" in this.ucConverter)
{
msg = this.ucConverter.ConvertFromUnicode(msg) +
this.ucConverter.Finish();
}
else
{
msg = this.ucConverter.ConvertFromUnicode(msg + " ");
msg = msg.substr(0, msg.length - 1);
}
}
catch (ex)
{
//dd ("caught exception " + ex + " converting " + msg + " to charset " +
// charset);
}
return msg;
}