using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; namespace ConvertToUtf8
{
public class ClassFun
{
public static byte[] Pathology_ConvertToBinary(string source)
{
byte[] utf8Prefix = Encoding.UTF8.GetPreamble();
byte[] utf8Content = System.Text.Encoding.UTF8.GetBytes(source);
byte[] NewUtf8Content = new byte[utf8Prefix.Length + utf8Content.Length];
int NewUtf8ContentCount = ;
for (int i = ; i < utf8Prefix.Length; i++)
{
NewUtf8Content[NewUtf8ContentCount] = utf8Prefix[i];
NewUtf8ContentCount++;
}
for (int j = ; j < utf8Content.Length; j++)
{
NewUtf8Content[NewUtf8ContentCount] = utf8Content[j];
NewUtf8ContentCount++;
} return NewUtf8Content;
}
}
}

最新文章

  1. Undo/Redo for Qt Tree Model
  2. DirectX11 SDK 例程报错解决方法
  3. find 查找文件 -exec 然后压缩 查看tar包的内容
  4. Linux磁盘操作命令
  5. hihoCoder挑战赛23
  6. 51.ISE中的DCM全局时钟转为普通IO
  7. System.web.optimization 在 Asp.Net WebForm 中应用得注意了
  8. 【BZOJ】1925: [Sdoi2010]地精部落 DP+滚动数组
  9. Oracle----&gt;基本DDL
  10. Vijos P1521 跳舞 贪心
  11. 「OC」构造方法和分类
  12. leetcode:Reverse Nodes in k-Group(以k为循环节反转链表)【面试算法题】
  13. Go笔记-标准库的介绍
  14. codeforces 983B XOR-pyramid
  15. Service Fabric部署笔记
  16. 设计模式之一工厂方法模式(Factory Method)
  17. HBASE分布式集群搭建(ubuntu 16.04)
  18. 关于Numba开源库(Python语法代码加速处理,看过一个例子,速度可提高6倍)
  19. 自动化部署-从maven到shell脚本到jenkins
  20. EntityFramework笔记

热门文章

  1. 从客户端(xxxxxxxxxxxxxxxxxxxxxx)中检测到有潜在危险的 Request.Form 值。
  2. Swift—类型检查与转换-备
  3. Boost编程之获取可执行文件的当前路径
  4. css属性之@media
  5. HDU_2053
  6. HDU-1428(记忆化搜索)
  7. Centos6 httpd与tomcat整合发布
  8. 给大家推荐一款代替Visio的在线作图工具ProcessOn
  9. Android开发中Handler的经典总结--转载至网络
  10. ie浏览器中 overflow:hidden无作用的解决方案