[cups.bugs] [MOD] STR #2812: transcodes file names in argv
Till Kamppeter
till.kamppeter at gmail.com
Wed Apr 30 15:02:04 PDT 2008
Michael Sweet wrote:
> Martin Pitt wrote:
>> Hi Michael,
>>
>> Michael Sweet [2008-04-29 19:56 -0700]:
>>> This is working exactly as designed/required. If you use filenames that
>>> have a different encoding than the locale, you need to redirect from
>>> stdin, e.g.:
>>
>> Sure, that's a workaround, but why deliberately break it in the first
>> place? I don't think it is *ever* right to transcode a file name in
>> argv; unlike I alluded in my initial post, the currently set locale
>> doesn't influence open(), it just takes the bits as they are.
>
> Except that the command-line contains a lot of options which use
> the locale encoding. If we don't transcode the command-line, we
> can't depend on having UTF-8 going to the scheduler, and that
> includes filenames.
>
Is it not the case that the file access is done by the CLI frontend
itself and not the scheduler? Then one could use the unchanged file name
to locally access the file but send the UTF-8-encoded one to the
scheduler, so that job listing tools show the job correctly. So the
conversion to UTF-8 should happen directly before the command line
pieces are sent to the scheduler.
Till
More information about the cups
mailing list