找回密码
 注册
Simdroid-非首页
查看: 47|回复: 0

utf-8文件处理出现奇怪问题

[复制链接]
发表于 2013-12-2 23:54:50 | 显示全部楼层 |阅读模式 来自 北京
在上一个帖子(http://forum.simwe.com/thread-1092819-1-1.html)中的处理utf-文件的方法无效。
改用下面方法:R14版本的默认字符集为'ibm-1386_P100-2002',通过命令slCharacterEncoding('UTF-8')设置为utf-8字符集。如果正常执行完全部语句,再用slCharacterEncoding('ibm-1386_P100-2002')回复过来。
但是在处理某些字符段(是某些,不是全部,但是还不知道是具有哪些特点的字符),出现下面错误:
Found corrupted block 2003 in table 6. (invalid table index).
Table 6. Current pointer is invalid.
------------------------------------------------------------------------
             Assertion detected at Mon Dec 02 23:43:03 2013
------------------------------------------------------------------------
Assertion failed: Forced Assertion at line 512 of file ".\memmgr\memcache.cpp".
Cache consistency error: Memory block header may be corrupt

Configuration:
  MATLAB Version:   7.0.0.19920 (R14)
  Operating System: Microsoft Windows XP
  Window System:    Version 5.1 (Build 2600: Service Pack 3)
  Processor ID:     x86 Family 6 Model 5 Stepping 2, GenuineIntel
  Virtual Machine:  Java 1.4.2 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
    (mixed mode)
  Default Charset:  ibm-1386_P100-2002
Stack Trace:
  [0] bridge.dll:_mnSignalHandler(0xffffffff, 0, 0, 0x79c79bb3) + 303 bytes
  [1] bridge.dll:void __cdecl ThrowAssertion(void)(6, 0x78771000, 0x65737341, 0x6f697472) + 164 bytes
  [2] bridge.dll:void __cdecl MATLABAssertFcn(char const *,char const *,int,char const *)(0x787492b4 ": Forced Assertion", 0x78749d48 ".\memmgr\memcache.cpp", 512, 0x78749dec "Cache consistency error: Memory ..") + 110 bytes
  [3] libut.dll:_mw_malloc(0x01427c70, 0x00cdc5e0, 0x787b0eae, 104) + 352 bytes
  [4] libut.dll:_utMalloc(104, 0, 0, 6) + 19 bytes
Found corrupted block 366 in table 23. (invalid table index).
Found corrupted block 1172 in table 23. (invalid table index).
Error in ==> blanks at 13
b = space(ones(1,n));
Error in ==> strcat at 73
s0 =  blanks(space);
Error in ==> waypoint at 79
        str=strcat('<cmt>',cmt{i,1},'</cmt>');

其中cmt是cell型数据,cmt{i,1}要么为空,要么为字符串。当cmt{i,1}为字符串"房山"时,出现上述错误,具体的语句是:
    if ~isempty(cmt{i,1})
        str=strcat('<cmt>',cmt{i,1},'</cmt>');
        fprintf(FID,'%s\r\n',str);
    end

为什么??


您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-9-30 07:00 , Processed in 0.036013 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表