- 积分
- 0
- 注册时间
- 2006-3-27
- 仿真币
-
- 最后登录
- 1970-1-1
|
在上一个帖子(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
为什么??
|
|