SublimeText / PackageDev

Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
MIT License
436 stars 83 forks source link

"Convert to YAML" converts cyrillic characters to unicode-escaped #276

Closed atomichammer closed 4 years ago

atomichammer commented 4 years ago

Converting an *.tmlangauage file which contains cyrillic text in UTF-8 to YAML results in this text being converted to unicode-escaped sequence. For example:

<dict>
    <key>comment</key>
    <string>ключевые слова, которые формируют или прерывают цикл</string>
    <key>match</key>
    <string>(?i)\b(elif|else|for|if|while|break|continue|return|end)\b</string>
    <key>name</key>
    <string>keyword.control.flow.mac</string>
</dict>

converts to

- comment: "\u043A\u043B\u044E\u0447\u0435\u0432\u044B\u0435 \u0441\u043B\u043E\u0432\
    \u0430, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0444\u043E\u0440\u043C\u0438\
    \u0440\u0443\u044E\u0442 \u0438\u043B\u0438 \u043F\u0440\u0435\u0440\u044B\u0432\
    \u0430\u044E\u0442 \u0446\u0438\u043A\u043B"
  match: (?i)\b(elif|else|for|if|while|break|continue|return|end)\b
  name: keyword.control.flow.mac
FichteFoll commented 4 years ago

I fixed this on the master branch, but since there haven't been any other changes, I don't really want to wrap up a new release for this. If you need it fixed immediately, run the packagedev_convert command convert with "allow_unicode": true.