semweb / GreatReader

A "great" PDF reader for iOS. Available on the App Store.
https://itunes.apple.com/us/app/greatreader/id903651112
MIT License
612 stars 138 forks source link

How can I convert the selected string to UTF8 string? #7

Open Douglas-BJ opened 9 years ago

Douglas-BJ commented 9 years ago

when copy to clipboard , the selected string is not UTF8 encoded.

I have tested with English-only PDF, everything is OK except some NON-ascii characters .

When I tested with Chinese or Korean, it seems characters are not encoded properly.

How can I convert the selected string to UTF8 string?

Thanks in advance.

FYI, I used following code .

(void)contentView:(PDFPageContentView )contentView copyMenuSelected:(NSString )selectedString { UIPasteboard *pb = [UIPasteboard generalPasteboard]; [pb setString:selectedString]; }

semweb commented 9 years ago

I can copy and paste a selected string on my Japanese PDF. Some UTF-8 characters may be not supported.