| dots's profile我的TRACEPhotosBlogLists | Help |
|
|
January 15 Install DB2 v7 on RedHat Linux 9Long time ago since I installed db2 v7 on my linux box.
a fewsteps I still remembered are:
1. pdksh... don't know the version, RH 9's pdksh is OK
2. old libc... RH had old libc compatible package compat-glibc-6.2-2.1.3.2
3. libncurses, db2setup use old libncurses also, in my box file /usr/libncurses.so.4 is symbol link to /usr/i386-glibc21-linux/lib/libncurses.so.4.0, this file is a part of compat-glibc-6.2-2.1.3.2
4. /etc/sysctl.conf, we need change a default kernel parameter, put those line in to sysctl.conf
# Set maximum number of message queues to 128
# Set this to 1024 or higher on production systems kernel.msgmni = 128 -------------------------
4.5 db2setup goes here....
-------------------------
5. finally we need 2 env. vars export LD_ASSUME_KERNEL=2.2.5
export DB2ENVLIST=LD_ASSUME_KERNEL 6. try db2start ;-)
These'are also a lots of HOWTOs around the net...
November 16 前段时间研究vi宏的一个小实验品在命令模式下按shift-v就可以在当前位置插入系统日期
只要在$(HOME)/.exrc里面加入下面的字符影射代码
map V ma:r !date +\%Y-\%m-\%d^MD`apjdd`a10l libxml2中使用GB2312libxml2 的内部处理使用的是UTF-8取到的字符串是UTF-8编码的,在GB2312的程序中的转码就是下面这样了。感觉还有更好的支持中文的方法。。。。。
char *
xmlNodeGetContentGB2312(xmlNodePtr node) { char *i, *o, *bo, *bi, *fin; int ci, co, memsize; iconv_t gb; i = xmlNodeGetContent(node); if ( i == NULL) { return NULL; } ci = strlen(i)+1; o = (char *)xmlMalloc(ci); co = ci; memsize = co; bo = o; bi = i; gb = iconv_open("GB2312", "UTF-8"); if ((int)gb == -1) { LOGMSG0("打开UTF-8到GB2312的编码转化函数出错"); xmlFree(bo); xmlFree(bi); return NULL; } if (iconv(gb, &i, &ci, &o, &co) != 0) { LOGMSG0("转化UTF-8到GB2312的编码出错"); xmlFree(bo); xmlFree(bi); iconv_close(gb); return NULL; } xmlFree(bi); iconv_close(gb); fin = xmlRealloc(bo, memsize-co); if (fin == NULL) { LOGMSG0("内存出错"); xmlFree(bo); return NULL; } return fin; } |
|
|