the BOM in text file
I have a text file in resource which contained BOM, I tried some means to remove the BOM by copy to and back, replace with another file, but the one in clearcase always keeps the BOM. At last I have to remove it by skipping the first two bytes.
char* pdata = reinterpret_cast(lpData);
if( 0xff == pdata[0] && 0xFE == pdata[1] ) //skip BOM
{
pstart = pstart + 2/sizeof(TemplateType);
}
char* pdata = reinterpret_cast
if( 0xff == pdata[0] && 0xFE == pdata[1] ) //skip BOM
{
pstart = pstart + 2/sizeof(TemplateType);
}
0 Comments:
Post a Comment
<< Home