diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-05-16 23:25:55 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-05-16 23:25:55 +0200 |
| commit | a1ab15155846932af41907c4c3a66ef489a29c2c (patch) | |
| tree | 541fe683998c942848c747e52c7bfba3bfd16b9e /Hotline | |
| parent | 45829daa856b376b1ab04d415917110b71b1dec5 (diff) | |
Encode as macRoman
Diffstat (limited to 'Hotline')
| -rw-r--r-- | Hotline/Hotline/HotlineProtocol.swift | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Hotline/Hotline/HotlineProtocol.swift b/Hotline/Hotline/HotlineProtocol.swift index adcf7e5..52f4b1f 100644 --- a/Hotline/Hotline/HotlineProtocol.swift +++ b/Hotline/Hotline/HotlineProtocol.swift @@ -627,6 +627,9 @@ struct HotlineTransactionField { encrypt: Bool = false ) { var bytes = [UInt8](string.utf8) + if let macRomanData = string.data(using: .macOSRoman, allowLossyConversion: true) { + bytes = [UInt8](macRomanData) + } if encrypt { bytes = string.utf8.map { char in return 0xFF - char |