Open ahartwel opened 1 year ago
I encountered the exact same issue here. I'm using Yams.dump() to dump a dictionary:
import Foundation
import Yams
let testDict = ["testkey": "🔰test value with emoji"]
let desktopFolder = FileManager.default.urls(for: .desktopDirectory, in: .userDomainMask).first!
let ymlData = try Yams.dump(object: testDict).data(using: .utf8)!
try ymlData.write(to: desktopFolder.appending(path: "test.yaml"))
The result:
testkey: "\U0001F530test value with emoji"
Has anyone found a solution to this problem?
If a yaml string has emojis inside of it, after running
serialize
they are escaped in the final output.For example
this:
gets turned into
after going through a Yams.compose -> Yams.serialize cycle.
Here's a simple repro: