在YAML中存储特殊符号

在YAML中存储特殊符号,yaml,Yaml,我需要存储特殊符号,如®和™ 在我的YAML中,因为系统的某些部分使用它在电子邮件中创建标题 例如: email: app: test_subject: "Some test message with the special symbol®" Hi, this is Some test message with the special symbol® ^

我需要存储特殊符号,如®和™ 在我的YAML中,因为系统的某些部分使用它在电子邮件中创建标题

例如:

email:
  app:
    test_subject: "Some test message with the special symbol®"
Hi, this is Some test message with the special symbol®
                                                     ^
                                                     |
                       _______________________________                              
                
当我测试邮件api时,我在邮件中遇到了一些特殊符号的问题,例如:

email:
  app:
    test_subject: "Some test message with the special symbol®"
Hi, this is Some test message with the special symbol®
                                                     ^
                                                     |
                       _______________________________                              
                

如何修复它并将这些字符存储在yaml文件中?

查看原始电子邮件标题。主题行的UTF-8编码是否正确?@Gereon我将其解码。b'一些带有特殊符号\xc2\xae'\xc2\xae it®的测试消息,如我所见。这似乎是错误的。您应该会看到类似于
=utf-8?Q?您好,这是一些测试…
有关更多信息,请查看RFC 1342。