lucasmazza / copy-as-rtf

A package to export highlighted code as RTF
Other
19 stars 14 forks source link

Non-latin characters do not work #3

Closed be9 closed 10 years ago

be9 commented 10 years ago

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 :(

lucasmazza commented 10 years ago

@be9 this is the same bug as mentioned here -> https://github.com/lucasmazza/copy-as-rtf/issues/2#issuecomment-53369162 It's a problem with pygments that we can't resolve on our side.

lucasmazza commented 10 years ago

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

be9 commented 10 years ago

Yeah, thanks. Works as charm now!