Skip to content

Commit

Permalink
Configurable default encoding for data_coding=0
Browse files Browse the repository at this point in the history
  • Loading branch information
farhadi committed Sep 18, 2015
1 parent feaf062 commit 68288cb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/defs.js
Expand Up @@ -301,6 +301,11 @@ Object.defineProperty(encodings, 'detect', {
}
});

Object.defineProperty(encodings, 'default', {
value: 'ASCII',
writable: true
});

var filters = {};

filters.time = {
Expand Down Expand Up @@ -383,7 +388,7 @@ filters.message = {
}
var encoding = this.data_coding & 0x0F;
if (!encoding) {
encoding = 'ASCII';
encoding = encodings.default;
} else {
for (var key in consts.ENCODING) {
if (consts.ENCODING[key] == encoding) {
Expand Down

0 comments on commit 68288cb

Please sign in to comment.