mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Use mdb_unicode2ascii in mdb_col_to_string
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
Sat Jul 17 23:09:40 CDT 2004 Jeff Smith <whydoubt@yahoo.com>
|
Sat Jul 17 23:09:40 CDT 2004 Jeff Smith <whydoubt@yahoo.com>
|
||||||
* src/libmdb/catalog.c: Clean out some stale code
|
* src/libmdb/catalog.c: Clean out some stale code
|
||||||
|
* src/libmdb/data.c: Use mdb_unicode2ascii in mdb_col_to_string
|
||||||
|
|
||||||
Sat Jul 17 09:21:13 CDT 2004 Jeff Smith <whydoubt@yahoo.com>
|
Sat Jul 17 09:21:13 CDT 2004 Jeff Smith <whydoubt@yahoo.com>
|
||||||
* include/mdbtools.h:
|
* include/mdbtools.h:
|
||||||
|
|||||||
@@ -1047,16 +1047,7 @@ char *mdb_col_to_string(MdbHandle *mdb, unsigned char *buf, int start, int datat
|
|||||||
}
|
}
|
||||||
fprintf(stdout, "\n");
|
fprintf(stdout, "\n");
|
||||||
*/
|
*/
|
||||||
if (mdb->pg_buf[start]==0xff &&
|
mdb_unicode2ascii(mdb, mdb->pg_buf, start, size, text);
|
||||||
mdb->pg_buf[start+1]==0xfe) {
|
|
||||||
strncpy(text, &mdb->pg_buf[start+2], size-2);
|
|
||||||
text[size-2]='\0';
|
|
||||||
} else {
|
|
||||||
/* convert unicode to ascii, rather sloppily */
|
|
||||||
for (i=0;i<size;i+=2)
|
|
||||||
text[i/2] = mdb->pg_buf[start + i];
|
|
||||||
text[size/2]='\0';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
strncpy(text, &buf[start], size);
|
strncpy(text, &buf[start], size);
|
||||||
text[size]='\0';
|
text[size]='\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user