⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utf8.cpp

📁 《UIQ 3 The Complete Guide》书的源代码
💻 CPP
字号:
//
// This is the entire source code for the little utility application used to convert Notepad based UTF8 text 
// files to Symbian Resource compilier UTF8 compatible UTF8 files. 
//
// Basically all we have to do is junk the first 3 chars of the file - the document BOM
//
// NOTE - THERE IS NO ERROR CHECKING, progress reporting, name validation etc in this app. Its the minimalist
// it can be!.
//
// Call in DOS batch file:
//
// utf8_conv Utf8_SignedApp.rls SignedApp.rls
//

#include "stdafx.h"
#include "stdio.h"


int main(int argc, char* argv[])
{
	puts("Utf8 conv");
	puts(argv[1]);
	puts(" to ");
	puts(argv[2]);

	FILE* src=fopen(argv[1],"r");
	fseek(src,3,0);	// junk 1st 3 chars - utf8 hdr
	FILE* dest=fopen(argv[2],"w");

	unsigned char bb[1024];
	while(1)
		{
		size_t ret=fread(&bb[0],1,1024,src);
		if (ret>0)
			fwrite(&bb[0],1,ret,dest);
		if (ret<1024)
			break;
		}
	fclose(src);
	fclose(dest);
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -