Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It copy a lot of strange characters #9

Open
jcmadrigalg opened this issue Apr 22, 2015 · 8 comments
Open

It copy a lot of strange characters #9

jcmadrigalg opened this issue Apr 22, 2015 · 8 comments
Labels

Comments

@jcmadrigalg
Copy link

Hi,
I tried to use this package, but it didn't work to me.

I try this sample:

#include <stdio.h>

void main(){
 //some sentence
}

But when I copy with the package, it paste this to me.

{\rtf1\ansi\uc0\deff0{\fonttbl{\f0\fmodern\fprq1\fcharset0 Monaco;}}{\colortbl;\red0\green0\blue0;\red78\green154\blue6;\red0\green0\blue207;\red143\green89\blue2;\red245\green121\blue0;\red32\green74\blue135;\red206\green92\blue0;\red248\green248\blue248;\red0\green160\blue0;\red52\green101\blue164;\red128\green0\blue128;\red164\green0\blue0;\red92\green53\blue204;\red239\green41\blue41;\red196\green160\blue0;\red0\green0\blue128;\red204\green0\blue0;}\f0 {\cf4\i #}{\cf4\i include <stdio.h>}{\cf4\i \par
}\par
{\cf6\b void} {\cf1 main}{\cf1\b (}{\cf1\b )}{\cf1\b \{}\par
 {\cf4\i //some sentence\par
}{\cf1\b \}}\par
}

I'm using:

  • UI Theme: Seti UI
  • Syntax Theme: Solarized Dark
  • Atom 0.194.0

Thanks a lot!

@jcmadrigalg jcmadrigalg changed the title It copy a lot of characters It copy a lot of strange characters Apr 22, 2015
@lucasmazza
Copy link
Owner

@charlynet7 that's the RTF format of the code you copied - if you paste it somewhere that supports RTF (instead of a plain text editor or something like that) it should paste the code with the proper syntax highlight.

@jcmadrigalg
Copy link
Author

Hi @lucasmazza ,
I actually paste it to Outlook or Word, and both support RTF, it work with the Notepad++ feature.
And I do have the issue of #5 .
Thanks.

@laike9m
Copy link

laike9m commented Jun 23, 2015

+1
Paste to evernote which is supposed to support rtf.

@lucasmazza
Copy link
Owner

I haven't replicated this issue so far, and I think it might be something very Windows specific. I don't have the right environment to test this out, so it would be very welcomed if someone else could track this down and fix it.

@steak3
Copy link
Collaborator

steak3 commented Sep 25, 2015

+1 for me.
Is it possible to re-open the issue?

@tafkey
Copy link

tafkey commented Jan 20, 2016

+1 - same bug here Arch Linux, LibreOffice 5.0.4.2 00m0(Build:2)

@steak3
Copy link
Collaborator

steak3 commented Jan 20, 2016

It's OK for Mac and Windows now.
@tafkey It should be OK for Linux too since xclip command is available in your system. Check it in a terminal. I will try to get an Arch Linux VM.

@steak3 steak3 reopened this Jan 20, 2016
@steak3 steak3 added the bug label Jan 20, 2016
@niwatako
Copy link

niwatako commented Apr 21, 2017

This issue occurs for me too.
I use macOS Sierra (Japanese), Atom 1.16.0, copy-as-rtf 0.9.3.
Original file format I copied is UTF-8.
I paste to TextEdit (supports RTF).

May be, character code of \ (back slash) is wrong.

Sample

It is (U+00A5)

2017-04-21 18 36 09
{¥rtf1¥ansi¥uc0¥deff0{¥fonttbl{¥f0¥fmodern¥fprq1¥fcharset0 Monaco;}}{¥colortbl;¥red0¥green0¥blue0;¥red78¥green154¥blue6;¥red0¥green0¥blue207;¥red143¥green89¥blue2;¥red245¥green121¥blue0;¥red32¥green74¥blue135;¥red128¥green0¥blue128;¥red206¥green92¥blue0;¥red248¥green248¥blue248;¥red0¥green160¥blue0;¥red52¥green101¥blue164;¥red164¥green0¥blue0;¥red92¥green53¥blue204;¥red239¥green41¥blue41;¥red196¥green160¥blue0;¥red0¥green0¥blue128;¥red204¥green0¥blue0;}¥f0 ¥fs32{¥cf1 pygmentize = }{¥cf1 require} {¥cf2 '}{¥cf2 pygmentize-bundled}{¥cf2 '}¥par
{¥cf1 copy = }{¥cf1 require} {¥cf2 '}{¥cf2 copy-paste}{¥cf2 '}¥par
{¥cf1 mapping = }{¥cf1 require} {¥cf2 '}{¥cf2 ./grammar-mapping}{¥cf2 '}¥par
}

It should be (U+005C)

2017-04-21 18 36 23
{\rtf1\ansi\uc0\deff0{\fonttbl{\f0\fmodern\fprq1\fcharset0 Monaco;}}{\colortbl;\red0\green0\blue0;\red78\green154\blue6;\red0\green0\blue207;\red143\green89\blue2;\red245\green121\blue0;\red32\green74\blue135;\red128\green0\blue128;\red206\green92\blue0;\red248\green248\blue248;\red0\green160\blue0;\red52\green101\blue164;\red164\green0\blue0;\red92\green53\blue204;\red239\green41\blue41;\red196\green160\blue0;\red0\green0\blue128;\red204\green0\blue0;}\f0 \fs32{\cf1 pygmentize = }{\cf1 require} {\cf2 '}{\cf2 pygmentize-bundled}{\cf2 '}\par
{\cf1 copy = }{\cf1 require} {\cf2 '}{\cf2 copy-paste}{\cf2 '}\par
{\cf1 mapping = }{\cf1 require} {\cf2 '}{\cf2 ./grammar-mapping}{\cf2 '}\par
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants