ALT Linux Bugzilla
– Attachment 308 Details for
Bug 3201
Кодировка при выводе на терминал
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
VTE status patch v2.1
grip-3.1.2-alt-vte.patch (text/plain), 4.17 KB, created by
Dmitry Vukolov
on 2003-10-31 05:46:20 MSK
(
hide
)
Description:
VTE status patch v2.1
Filename:
MIME Type:
Creator:
Dmitry Vukolov
Created:
2003-10-31 05:46:20 MSK
Size:
4.17 KB
patch
obsolete
>diff -Nur grip-3.1.2.orig/src/cdplay.c grip-3.1.2/src/cdplay.c >--- grip-3.1.2.orig/src/cdplay.c 2003-10-02 04:34:09 +0400 >+++ grip-3.1.2/src/cdplay.c 2003-10-31 02:29:04 +0300 >@@ -189,6 +189,7 @@ > gboolean success=FALSE; > DiscInfo *disc; > DiscData *ddata; >+ char *utf8_lartist, *utf8_ltitle; > > disc=&(ginfo->disc); > ddata=&(ginfo->ddata); >@@ -211,9 +212,14 @@ > switch(query.query_match) { > case MATCH_INEXACT: > case MATCH_EXACT: >+ utf8_lartist=g_convert(query.query_list[0].list_artist,-1, >+ "utf-8",ginfo->discdb_encoding,NULL,NULL,NULL); >+ utf8_ltitle=g_convert(query.query_list[0].list_title,-1, >+ "utf-8",ginfo->discdb_encoding,NULL,NULL,NULL); > LogStatus(ginfo,_("Match for \"%s / %s\"\nDownloading data...\n"), >- query.query_list[0].list_artist, >- query.query_list[0].list_title); >+ utf8_lartist, utf8_ltitle); >+ g_free(utf8_lartist); >+ g_free(utf8_ltitle); > entry.entry_genre = query.query_list[0].list_genre; > entry.entry_id = query.query_list[0].list_id; > DiscDBRead(disc,server,&hello,&entry,ddata); >diff -Nur grip-3.1.2.orig/src/rip.c grip-3.1.2/src/rip.c >--- grip-3.1.2.orig/src/rip.c 2003-10-02 05:51:17 +0400 >+++ grip-3.1.2/src/rip.c 2003-10-31 03:02:04 +0300 >@@ -787,6 +787,7 @@ > gfloat elapsed=0; > gfloat speed; > gboolean result=FALSE; >+ char *conv_str; > > uinfo=&(ginfo->gui_info); > >@@ -977,8 +978,10 @@ > > if(!ginfo->stop_encode) { > if(ginfo->delete_wavs) { >- LogStatus(ginfo,_("Deleting [%s]\n"), >- ginfo->rip_delete_file[mycpu]); >+ conv_str=g_convert(ginfo->rip_delete_file[mycpu],-1, >+ "utf-8",ginfo->fs_encoding,NULL,NULL,NULL); >+ LogStatus(ginfo,_("Deleting [%s]\n"),conv_str); >+ g_free(conv_str); > unlink(ginfo->rip_delete_file[mycpu]); > } > >@@ -1345,7 +1348,7 @@ > struct stat mystat; > GString *str; > EncodeTrack enc_track; >- char *conv_str; >+ char *conv_str, *utf8_ripfile; > gsize rb,wb; > > uinfo=&(ginfo->gui_info); >@@ -1415,8 +1418,10 @@ > sleep(5); > } > >+ utf8_ripfile=g_convert(ginfo->ripfile,-1,"utf-8",ginfo->fs_encoding, >+ NULL,NULL,NULL); > LogStatus(ginfo,_("Ripping track %d to %s\n"), >- ginfo->rip_track+1,ginfo->ripfile); >+ ginfo->rip_track+1,utf8_ripfile); > > ginfo->rip_started = time(NULL); > sprintf(tmp,_("Rip: Trk %d (0.0x)"),ginfo->rip_track+1); >@@ -1425,7 +1430,8 @@ > if(stat(ginfo->ripfile,&mystat)>=0) { > if(mystat.st_size == ginfo->ripsize) { > LogStatus(ginfo,_("File %s has already been ripped. Skipping...\n"),\ >- ginfo->ripfile); >+ utf8_ripfile); >+ g_free(utf8_ripfile); > if(ginfo->doencode) ginfo->num_wavs++; > ginfo->ripping=TRUE; > ginfo->ripping_a_disc=TRUE; >@@ -1435,6 +1441,7 @@ > } > else unlink(ginfo->ripfile); > } >+ g_free(utf8_ripfile); > > bytesleft=BytesLeftInFS(ginfo->ripfile); > >@@ -1662,7 +1669,10 @@ > > bytesleft=BytesLeftInFS(ginfo->mp3file[cpu]); > >- LogStatus(ginfo,_("%i: Encoding to %s\n"),cpu+1,ginfo->mp3file[cpu]); >+ conv_str=g_convert(ginfo->mp3file[cpu],-1,"utf-8",ginfo->fs_encoding, >+ NULL,NULL,NULL); >+ LogStatus(ginfo,_("%i: Encoding to %s\n"),cpu+1,conv_str); >+ g_free(conv_str); > > sprintf(tmp,_("Enc: Trk %d (0.0x)"),encode_track+1); > gtk_label_set(GTK_LABEL(uinfo->mp3_prog_label[cpu]),tmp); >diff -Nur grip-3.1.2.orig/src/status_window.c grip-3.1.2/src/status_window.c >--- grip-3.1.2.orig/src/status_window.c 2003-10-02 05:15:56 +0400 >+++ grip-3.1.2/src/status_window.c 2003-10-31 03:18:15 +0300 >@@ -82,13 +82,19 @@ > /* Write a line of output to a status window */ > void StatusWindowWrite(StatusWindow *sw,char *msg) > { >- char *buf; >+ char *buf, *locale_msg; > int len; > int pos=0; > > /* gtk_widget_queue_resize(sw->term_widget);*/ > >- len=strlen(msg); >+ if(g_utf8_validate(msg,-1,NULL)) { >+ locale_msg=g_locale_from_utf8(msg,-1,NULL,&len,NULL); >+ msg=locale_msg; >+ } >+ else { >+ len=strlen(msg); >+ } > > buf=(char *)malloc((len*2)+1); > >@@ -107,6 +113,7 @@ > } > > buf[pos]='\0'; >+ g_free(locale_msg); > > /* zvt_term_feed((ZvtTerm *)sw->term_widget,buf,strlen(buf));*/ >
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 3201
:
305
|
306
|
307
| 308