Results 1 to 5 of 5

Thread: Why I can't print files with Chinese Char with lp command

  1. #1

    Default Why I can't print files with Chinese Char with lp command

    I try:

    1. lp file_with_english_chinese
    2. lp -ozh_CN.utf8 file_with_english_chinese

    The normal ascii characer prints ok but the chinese character are blank.

    What's wrong?

    Thanks in advance!

    Gallzzy

  2. #2

    Default Re: Why I can't print files with Chinese Char with lp command

    I try:

    1. lp file_with_english_chinese
    2. lp -ozh_CN.utf8 file_with_english_chinese

    The normal ascii character prints ok but the chinese character are blank.

    What's wrong?

    oops, sorry I forgot to mention I have an ancient HP LaserJet 5 Si MX on a TCP/IP LAN.
    LaserJet 5 is installed using yast2.


    Thanks,
    Gallzzy

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Why I can't print files with Chinese Char with lp command

    On 2011-07-05 20:36, Gallzzy wrote:
    >
    > I try:
    >
    > 1. lp file_with_english_chinese
    > 2. lp -ozh_CN.utf8 file_with_english_chinese
    >
    > The normal ascii character prints ok but the chinese character are
    > blank.


    The file is plain text? I guess it is converted to postscript first, then
    sent to the printer. You would have to check the ascii to ps filter, I think.

    You can also ask in the mail list, I know there are some "printing experts"
    there. I don't know the exact tool chain used for the conversion.

    You could also upload the file somewhere so that we can try replicate the
    problem on different printer. One page only, please! I know no Chinese, so
    I can't test a long printout.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  4. #4

    Default Re: Why I can't print files with Chinese Char with lp command

    Thanks Carlos for the reply. Yes, its a plain text file.

    I Google all day yesterday and luckily run into a solution.
    You are absolutely right the problem is in texttops, for those who might run into the same problem.

    I got the answer in this thread:
    Vim - General - Printing with utf-8 characters on Windows
    Don't let the "Windows" title fool you, its all about Linux!

    I replace texttops with the following script and it works pretty well.
    > #!/bin/sh
    > paps < "$6" | title="$3" perl -lpwe 's/stdin/$ENV{title}/ if 2==$.'

    Thanks,
    Gallzzy

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Why I can't print files with Chinese Char with lp command

    On 2011-07-06 16:36, Gallzzy wrote:
    >
    > Thanks Carlos for the reply. Yes, its a plain text file.


    Welcome, and glad you found a way. Then it is a bug in texttops? Perhaps it
    should be reported in Bugzilla.

    I'll save your post for reference.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •