lucasmazza/copy-as-rtf

Non-latin characters do not work

Closed this issue · 3 comments

be9 commented

When I try to apply "copy as rtf" to something like this:

// комментарий (this is Russian for "comment")
int a, b, c;

I get following:

Error calling `pygmentize`: 
*** Error while highlighting:
TypeError: ord() expected a character, but string of length 2 found
   (file "/Users/be9/.atom/packages/copy-as-rtf/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/formatters/rtf.py", line 77, in _escape_text)

It seems UTF-8 isn't handled correctly :(

@be9 this is the same bug as mentioned here -> #2 (comment) It's a problem with pygments that we can't resolve on our side.

I've noticed the discussion on rvagg/archived-node-pygmentize-bundled#12 and I published a new version with the updated dependency, hope it helps :)

be9 commented

Yeah, thanks. Works as charm now!