mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-23 19:20:41 +02:00
Utilize explicit_encoding at export if set
This commit is contained in:
parent
bf8552e24f
commit
f45de620b1
1 changed files with 7 additions and 4 deletions
|
@ -390,11 +390,14 @@ function FTNMessageScanTossModule() {
|
||||||
message.meta.FtnKludge.TID = ftnUtil.getProductIdentifier();
|
message.meta.FtnKludge.TID = ftnUtil.getProductIdentifier();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Determine CHRS and actual internal encoding name
|
// Determine CHRS and actual internal encoding name. If the message has an
|
||||||
// Try to preserve anything already here
|
// explicit encoding set, use it. Otherwise, try to preserve any CHRS/encoding already set.
|
||||||
//
|
//
|
||||||
let encoding = options.nodeConfig.encoding || 'utf8';
|
let encoding = options.nodeConfig.encoding || Config.scannerTossers.ftn_bso.packetMsgEncoding || 'utf8';
|
||||||
if(message.meta.FtnKludge.CHRS) {
|
const explicitEncoding = _.get(message.meta, 'System.explicit_encoding');
|
||||||
|
if(explicitEncoding) {
|
||||||
|
encoding = explicitEncoding;
|
||||||
|
} else if(message.meta.FtnKludge.CHRS) {
|
||||||
const encFromChars = ftnUtil.getEncodingFromCharacterSetIdentifier(message.meta.FtnKludge.CHRS);
|
const encFromChars = ftnUtil.getEncodingFromCharacterSetIdentifier(message.meta.FtnKludge.CHRS);
|
||||||
if(encFromChars) {
|
if(encFromChars) {
|
||||||
encoding = encFromChars;
|
encoding = encFromChars;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue