ALT Linux Bugzilla
– Attachment 6966 Details for
Bug 29879
Не печатает в случае LANG=ru_RU.KOI8-R
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Rude patch to fix the problem
util.c.patch (text/plain), 1.57 KB, created by
Gulevich A.I.
on 2017-02-09 08:05:13 MSK
(
hide
)
Description:
Rude patch to fix the problem
Filename:
MIME Type:
Creator:
Gulevich A.I.
Created:
2017-02-09 08:05:13 MSK
Size:
1.57 KB
patch
obsolete
>--- a/util.c 2017-02-08 22:23:34.000000000 +0300 >+++ b/util.c 2017-02-08 22:18:29.000000000 +0300 >@@ -26,6 +26,8 @@ > # include <io.h> > #else > # include <unistd.h> >+# include <iconv.h> >+# include <langinfo.h> > #endif /* WIN32 || __EMX__ */ > > >@@ -209,9 +211,32 @@ > NULL, printer_uri); > ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", > NULL, cupsUser()); >- if (title) >- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, >- title); >+ if( title ) >+ { // ÕÂÏÇÁÑ ÓÔÁÔÉÞÅÓËÁÑ ÌÏÇÉËÁ, ÎÏ ÒÁÚÂÉÒÁÔØÓÑ Ó ËÏÎÔÅËÓÔÏÍ ÎÅÄÏÓÕÇ {2017/02/08 22:17} >+ static iconv_t CONV=(iconv_t)-1; >+ static char strres[PATH_MAX*4]; >+ >+ if( CONV == (iconv_t)-1 ) >+ { // ÕÄÁÌÅÎÉÅ ÎÅ ÔÒÅÂÕÅÔÓÑ ÔÁË ËÁË ÓÏÚÄÁ£ÔÓÑ ÏÄÉÎ ÒÁÚ É ÎÁ×ÓÅÇÄÁ. îÅÆÉÇÁ ÍÅÎÑÔØ LANG ÎÅ ÌÅÔÕ ÒÁÚ ÕÖ ÐÅÞÁÔÁÅÛØ. >+ if( (CONV = iconv_open("UTF-8",nl_langinfo(CODESET))) == (iconv_t)-1 ) title="singlejobnameerr1_alxed"; >+ } >+ >+ if( CONV != (iconv_t)-1 ) >+ { >+ size_t l1=strlen(title); >+ size_t l2=sizeof(strres); >+ char *inptr=(char*)title; >+ char *outptr=strres; >+ if( iconv(CONV,&inptr,&l1,&outptr,&l2) == (size_t)-1 ) title="singlejobnameerr2_alxed"; >+ else >+ { >+ strres[l2]=0; >+ title=strres; >+ } >+ } >+ >+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,title); >+ } > cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION); > cupsEncodeOptions2(request, num_options, options, IPP_TAG_JOB); > cupsEncodeOptions2(request, num_options, options, IPP_TAG_SUBSCRIPTION);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 29879
: 6966 |
6967