20 lines
581 B
TypeScript
20 lines
581 B
TypeScript
import {Converter} from "./converter";
|
|
import {NativeLibraryWrapperService} from "../nativelibrarywrapper.service";
|
|
|
|
export class QuotedPrintableEncoder implements Converter {
|
|
constructor(private nativeLibraryWrapperService:NativeLibraryWrapperService) {
|
|
}
|
|
|
|
getDisplayname():string {
|
|
return "Encode quoted printable";
|
|
}
|
|
|
|
getId():string {
|
|
return "encodequotedprintable";
|
|
}
|
|
|
|
convert(input:string):string {
|
|
return this.nativeLibraryWrapperService.quotedPrintable.encode(this.nativeLibraryWrapperService.utf8.encode(input));
|
|
}
|
|
}
|