Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 90104 Details for
Bug 81423
libtranslate-0.99.ebuild (New Package)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
charsetparse.patch
libtranslate-0.99-charsetparse.patch (text/plain), 1.49 KB, created by
Carles Escrig
on 2006-06-25 06:36:27 UTC
(
hide
)
Description:
charsetparse.patch
Filename:
MIME Type:
Creator:
Carles Escrig
Created:
2006-06-25 06:36:27 UTC
Size:
1.49 KB
patch
obsolete
>diff -Naur libtranslate-0.99.orig/src/modules/translate-generic-service.c libtranslate-0.99/src/modules/translate-generic-service.c >--- libtranslate-0.99.orig/src/modules/translate-generic-service.c Mon Apr 11 23:08:47 2005 >+++ libtranslate-0.99/src/modules/translate-generic-service.c Mon Apr 11 23:15:54 2005 >@@ -484,7 +484,7 @@ > > if (SOUP_STATUS_IS_SUCCESSFUL(message->status_code)) > { >- const char *charset = NULL; >+ char *charset = NULL; > > if (flags & TRANSFER_CONVERT) > { >@@ -493,14 +493,31 @@ > content_type = translate_generic_service_get_header(message, &info, "Content-Type"); > if (content_type) > { >- charset = translate_ascii_strcasestr(content_type, "charset="); >- if (charset) >- charset += 8; >+ const char *tmp; >+ >+ tmp = translate_ascii_strcasestr(content_type, "charset="); >+ if (tmp) >+ { >+ int len; >+ >+ tmp += 8; >+ if (*tmp == '\'' || *tmp == '"') >+ tmp++; >+ >+ len = strlen(tmp); >+ if (len > 0 && (tmp[len - 1] == '\'' || tmp[len - 1] == '"')) >+ len--; >+ >+ charset = g_strndup(tmp, len); >+ } > } > } > > if (charset) >- response = g_convert(message->response.body, message->response.length, "UTF-8", charset, NULL, NULL, err); >+ { >+ response = g_convert(message->response.body, message->response.length, "UTF-8", charset, NULL, NULL, err); >+ g_free(charset); >+ } > else > { > if ((flags & TRANSFER_CONVERT) && ! g_utf8_validate(message->response.body, message->response.length, NULL))
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 81423
:
50873
|
50961
| 90104 |
90105
|
90106
|
90107
|
90108