Ticket #25 (closed defect: fixed)

Opened 16 years ago

Last modified 16 years ago

pkturnkey and locale problems

Reported by: jerome Owned by: jerome
Priority: major Milestone:
Component: pykota Version: stable
Keywords: locale Cc:

Description

pkturnkey launches 'lpstat -v' to retrieve the list of available print queues. With some locales, the output isn't parsed correctly in the listPrinters method of the PKTurnKey class, and printers with funny names are created in PyKota's database.

Problem reported by Yang Darren.

Change History

Changed 16 years ago by jerome

  • status changed from new to accepted

Several solutions might work :

- Unset LC_ALL, LC_MESSAGES and/or LANG before launching lpstat.
- Convert lpstat's output to UTF-8 before doing the parsing, based on the active locale and charset.
- Not use lpstat at all, but use IPP requests directly.

My own preference goes to the third one.

Changed 16 years ago by jerome

  • status changed from accepted to closed
  • resolution set to fixed

(In [3416]) Fixes #25 using the third way. Needs to be ported to trunk if pkturnkey
still makes it in 1.27 final, which I'm really not sure about,
considering how it's easy, and probably more versatile, to do the same with
some shell scripting.

Changed 16 years ago by jerome

(In [3424]) Ported the fix for #25 to trunk. References #25.

Note: See TracTickets for help on using tickets.