| Summary: | Evolution Palm Conduits - ISO8859-2 problem SOLVED (patch) | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Michael Dominic K. <mdk> |
| Component: | [OLD] GNOME | Assignee: | Gentoo PDA project <pda> |
| Status: | RESOLVED NEEDINFO | ||
| Severity: | enhancement | CC: | gnome |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
Applies to app-pda/pilot-link. In the source: libpisock/util.c
app-pda/pilot-link-0.11.8/work/pilot-link-0.11.8/libpisock/util.c |
||
|
Description
Michael Dominic K.
2004-10-15 17:54:30 UTC
Created attachment 41926 [details, diff]
Applies to app-pda/pilot-link. In the source: libpisock/util.c
Part of the libpisock library compiled with pilot-link.
One small detail - I made a typo. Should be: CP1252 (not CP1251) as the default characterset assumed by libpisock (doesn't change the sense, but just to make it clear). please provide the patch as a 'diff -uNr' to the evolution tree. Have you posted this patch upstream ? If not, you should. If you did, where is the bugzilla entry ? Comment on attachment 41926 [details, diff]
Applies to app-pda/pilot-link. In the source: libpisock/util.c
--- pilot-link-0.11.8/work/pilot-link-0.11.8/libpisock/util.c 2002-07-30
17:52:24.000000000 +0200
+++ pilot-link-0.11.8.patched/work/pilot-link-0.11.8/libpisock/util.c
2004-10-16 21:46:33.000000000 +0200
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
+ THIS FILE WAS PATCHED WITH ISO8859-2 PATCH FOR EVOLUTION CONDUITS */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -26,13 +26,14 @@
#include <stdlib.h>
#include <string.h>
+#include <stdio.h>
#include "pi-util.h"
#ifdef HAVE_ICONV
#include <iconv.h>
#endif
-#define PILOT_CHARSET "CP1252"
+#define PILOT_CHARSET "ISO8859-2"
/***********************************************************************
*
@@ -51,11 +52,13 @@
int bytes, char **ptext)
{
#ifdef HAVE_ICONV
- char *ib,
+
+ char *ib,
*ob;
iconv_t cd;
size_t ibl, obl;
-
+
+
cd = iconv_open(PILOT_CHARSET, charset);
if (!cd)
return -1;
@@ -65,13 +68,13 @@
ib = (char *)text;
*ptext = ob = malloc(obl);
- if (iconv(cd, &ib, &ibl, &ob, &obl) == -1)
- return -1;
+ iconv(cd, &ib, &ibl, &ob, &obl);
*ob = '\0';
iconv_close(cd);
return 0;
+
#else
return -1;
#endif
@@ -94,11 +97,12 @@
int bytes, char **text)
{
#ifdef HAVE_ICONV
+
char *ib,
*ob;
iconv_t cd;
size_t ibl, obl;
-
+
cd = iconv_open(charset, PILOT_CHARSET);
if (!cd)
return -1;
@@ -108,13 +112,13 @@
ib = (char *)ptext;
*text = ob = malloc(obl);
- if (iconv(cd, &ib, &ibl, &ob, &obl) == -1)
- return -1;
+ iconv(cd, &ib, &ibl, &ob, &obl);
*ob = '\0';
iconv_close(cd);
return 0;
+
#else
return -1;
#endif
Created attachment 41983 [details, diff]
app-pda/pilot-link-0.11.8/work/pilot-link-0.11.8/libpisock/util.c
Ups. sorry for pasting the patch as a comment. The new (diff) file is in the attachment. What do you mean by "Have you posted this patch upstream?" ? Should I make a bugzilla entry, and ask some people to test it? btw, have the pilot-link developers seen this patch. it doesn't look quite right to me by ignoring the status of iconv, given that possibly there maybe a reason why the check is there. need to look into this a bit more. Is this still a problem? please get back to us with updated information. |