Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

CAM::PDF encoding

by IvDiS (Initiate)
on Jan 25, 2011 at 10:10 UTC ( #884090=perlquestion: print w/ replies, xml ) Need Help??
IvDiS has asked for the wisdom of the Perl Monks concerning the following question:

Hi! Who is know how to out cyrillic symbols in readable view? I use CAM::PDF module and there are troubles with cyrillic text. Thank you.

Comment on CAM::PDF encoding
Re: CAM::PDF encoding
by roboticus (Canon) on Jan 25, 2011 at 11:01 UTC

    IvDIS:

    You've left quite a bit out of your question. What are you trying to view it with? You need to be specific, as there are different types of problems with different output devices. Please update your question after reviewing these nodes: Ask questions the smart way, I know what I mean. Why don't you? and How (Not) To Ask A Question.

    A DOS console, xterm, printer, HTML browser, Windows application, etc., may all have different issues preventing you from seeing the characters you want. Also, the code you're using can be relevant, as parsing fonts from PDF can have it's own issues. You may be having problems with encoding/decoding in the Perl application as well. So you need to provide more information before anyone will be able to help.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

Re: CAM::PDF encoding
by tilly (Archbishop) on Jan 26, 2011 at 07:18 UTC
    We don't know exactly what you are trying to do, and seemingly irrelevant details are very important.

    The fundamental problem has to do with encodings. ASCII proper only encodes things in the top 127 encodings. The representation of the remaining 128 things that fit in a byte is unspecified. Unfortunately the first approach to handling extra characters which are not in ASCII was to use the top 128 in different ways. Each way is different. And, for instance, in Windows the default way to handle those characters within a DOS prompt differs from what is is in a default Windows application. (And just what is shown may depend on the locale that you chose.) Just to confuse things, Windows cut and paste is designed to keep the visible characters the same, even when you change the representation. So if you see it in a Windows application, then cut and paste it into a script that you then show in a DOS prompt, you may see something very different from what you cut and pasted.

    So our problem is that we don't know what operating system you are on, where the Cyrillic text is coming from, how you are getting it into your Perl, and where you're looking at the output in. Every single one of these factors can affect the answer. (Yes, Unicode is supposed to solve this problem. The last time that I cared - which was several years ago - DOS prompts did not properly support UNICODE. I'm guessing that you're seeing the output of Perl in a DOS prompt...)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://884090]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-12-28 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls