On Tue, 21 Dec 2004, hemanth wrote:
> I have the below class to write pdf files. It writes well for English
> language, when i try to write for french it does not write é and writes
> special char (theta)
[snip long computer program]
This may be a case of the blind leading the blind as I am totally
unfamiliar with PDF file formats or whatever language you used but
your mentioning getting a theta instead of an e-acute gives me a
bit of a clue as to a possible cause of your problem.
What are you using as an input file? Whatever it is, there is a chance
that Windows is misinterpreting the text in the file as using the CP437
(IBM PC OEM) character set instead of ISO-8859-1 (or whatever you
intended) and is trying to convert it to the Windows character set
or Unicode as it's read in.
The Unicode code for the character 'é' is U+00E9 which is the same
in the ISO-8859-1 character set (and the Windows CP1252 character set)
(character 233 in decimal, E9 in hexadecimal). The IBM PC character set,
CP437 uses character 130 (hexadecimal 82) for the 'é' and character 233 is
an upper-case Theta (like 'O' and '-' overlapped).
Things to try:
1. Try using character 130 (hex 82) in your source text instead of
character 233 (hex E9) and see if that gives you an 'é'. If so,
then your source is being interpreted as being in character set 437
and you may have to restrict yourself to using characters in that
character set.
2. Try to find some way to inform the software you are using that the
original source text document should be interpreted as ISO-8859-1 or
CP1252 instead of the IBM PC OEM font, CP437.
3. Check your program documentation to see how/if you can specify
characters by number or Unicode value. (There should be a way to
specify more than 256 different characters if one wants to mix
Russian, Greek, and Chinese text in one document.) Possibly \0xE9
or \u00E9 or something like that will work (but don't blame me if,
instead of working as you want, trying that makes your computer
misbehave, changing all your JPEGs to crude ASCII art, reformatting
your hard drive and installing Windows 3.11, or leaving the toilet
seat up and throwing its dirty socks all over your living room floor).
--
Norman De Forest
http://www.chebucto.ns.ca/~af380/Profile.html af380@chebucto.ns.ca [=||=] (A Speech Friendly Site)
"O'Reilly is to a system administrator as a shoulder length latex glove
is to a veterinarian." -- Peter da Silva in the scary devil monastery