Open MathieuChe opened 1 year ago
Hey @MathieuChe I tried writing a test that roundtrips (encodes and then decodes) a string that has an é
character in it and the test seemed to work fine. This is what I did:
func testAccentedCharacter() {
let accented = try! CodableCBOREncoder().encode("Touché")
let accentedDecoded = try! CodableCBORDecoder().decode(String.self, from: french)
XCTAssertEqual(accentedDecoded, "Touché")
}
Please could you provide some code that some input, e.g. an example String
, that is failing for you, and then I can debug things further. Thanks!
Hey guys,
I have an issue as a french developer. I use special characters such as "é", "è", "ë" for example. And other users from other countries write in other language which need to use special characters.
Unfortunately, CBOR.decode() catch an error, that we cannot parse this data.
This method decode() try to return decodeItem()
As you can see below, it tries to decodeUtf8 from Util class,
decodingResult returns an error because decoder(UTF8) can't decode(&generator)
It may be a problem caused by UTF8 encoding type ? How could we fix this and help people who might have the same issue ? Thank you guys.