-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
When given text include emoji, the app crashed at line 61 (ZawgyiDetector.swift)
let char: Character = Character(UnicodeScalar(inputArray[offset])!)
cp = Int(char.unicodeScalarCodePoint())Apparently, converting to UnicodeScalar has resulted in crash since initialization is force unwrapped. When input is converted into utf16 array, it counts some emoji as two items. Only the combination of two utf16 results in desired emoji.
I am not sure if this is the correct fix.
Changed code line 48 (ZawgyiDetector.swift)
from this
let inputArray = Array(input.utf16)to this
let inputArray = Array(input.unicodeScalars)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels