You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
Merge pull request #7 from kkonradpl/unicode-fix
Fix unicode conversion
This commit is contained in:
@@ -164,12 +164,11 @@ rdsparser.register_rt(rds, callbacks.rt);
|
||||
rdsparser.register_ptyn(rds, callbacks.ptyn);
|
||||
rdsparser.register_ct(rds, callbacks.ct);
|
||||
|
||||
const decode_unicode = function(string)
|
||||
{
|
||||
const decode_unicode = function(string) {
|
||||
let content = rdsparser.string_get_content(string);
|
||||
let length = rdsparser.string_get_length(string);
|
||||
let array = koffi.decode(content, koffi.array(unicode_type, length));
|
||||
return Buffer.from(array, 'utf-8').toString();
|
||||
return String.fromCodePoint.apply(String, array);
|
||||
};
|
||||
|
||||
const decode_errors = function(string) {
|
||||
|
||||
Reference in New Issue
Block a user