当前位置: 首页 > news >正文

云教育科技网站建设网站图片少影响seo吗

云教育科技网站建设,网站图片少影响seo吗,阿坝州做网站公司,适合团购报名的网站开发原文:asp.net core输出中文乱码的问题 摘要 在学习asp.net core的时候#xff0c;尝试在控制台#xff0c;或者页面上输出中文#xff0c;会出现乱码的问题。 问题重现 新建控制台和站点 public class Program{public static void Main(string[] args){ Console.W… 原文:asp.net core输出中文乱码的问题 摘要 在学习asp.net core的时候尝试在控制台或者页面上输出中文会出现乱码的问题。 问题重现 新建控制台和站点 public class Program{public static void Main(string[] args){ Console.WriteLine(您好北京欢迎你);Console.Read();}} 站点 public class Startup{// This method gets called by the runtime. Use this method to add services to the container.// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID398940public void ConfigureServices(IServiceCollection services){}// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory){loggerFactory.AddConsole();if (env.IsDevelopment()){app.UseDeveloperExceptionPage();}app.Run(async (context) {await context.Response.WriteAsync(您好北京欢迎你);});}} 那么我们获取“GB2312”编码然后对其编码呢 public static void Main(string[] args){Console.WriteLine(您好北京欢迎你);try{Console.WriteLine(Encoding.GetEncoding(GB2312));}catch (Exception ex){Console.WriteLine(ex.Message);}Console.Read();}} GB2312 is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.Parameter name: name 上面的大概意思是Encoding 不支持GB2312编码需要使用Encoding.RegisterProvider方法进行注册Provider。 try{Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);Console.WriteLine(Encoding.GetEncoding(GB2312));}catch (Exception ex){Console.WriteLine(ex.Message);}Console.Read(); CodePagesEncodingProvider在Nuget包System.Text.Encoding.CodePages中 System.Text.Encoding.CodePages/4.0.1: {type: package,dependencies: {Microsoft.NETCore.Platforms: 1.0.1,System.Collections: 4.0.11,System.Globalization: 4.0.11,System.IO: 4.1.0,System.Reflection: 4.1.0,System.Resources.ResourceManager: 4.0.1,System.Runtime: 4.1.0,System.Runtime.Extensions: 4.1.0,System.Runtime.Handles: 4.0.1,System.Runtime.InteropServices: 4.1.0,System.Text.Encoding: 4.0.11,System.Threading: 4.0.11},compile: {ref/netstandard1.3/System.Text.Encoding.CodePages.dll: {}},runtimeTargets: {runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll: {assetType: runtime,rid: unix},runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll: {assetType: runtime,rid: win}}}, 好了我们修改下代码先注册然后输出中文 try{Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);Console.WriteLine(Encoding.GetEncoding(GB2312));Console.WriteLine(您好北京欢迎你);}catch (Exception ex){Console.WriteLine(ex.Message);} 结语 所以在页面上输出或者在控制台输出中文的时候要注意进行注册Provider。 参考 https://msdn.microsoft.com/zh-cn/library/system.text.encoding.registerprovider(vvs.110).aspx
http://www.huolong8.cn/news/265248/

相关文章:

  • 婚纱摄影网站大全想建书画网站怎么做的
  • 网站建设技术jsp课程设计咨询企业网站模板
  • 爱站网关键词wordpress主题首页幻灯片怎么修改
  • 网站建设侵权行为有哪些做家纺的网站
  • 新龙华网站建设青海做高端网站建设的公司
  • 电脑网站历史记录怎么查看怎么盗用网站
  • 北京公司建网站一般需要多少钱网站做等保是按照什么定级别的
  • 宿州集团网站建设网站制作方案要点
  • 常州有哪些做阿里巴巴网站的电子创意设计网站
  • 彩票网站代理怎么做网站后台信息管理怎么做
  • 自己做的网站能上传吗施工企业对下结算容易出现的问题
  • 兰州建设网站公司干煤棚网架公司
  • 网站建设优化规划书响水做网站
  • 电商网站设计工作内容东莞公司网站建设公司哪家好
  • 专用车网站建设价格网站页面统计代码是什么意思
  • 建设网站是否等于开展网络营销h5网站建设h
  • 广东网站建设专业公司哪家好珠海市建设工程交易网
  • wordpress怎样显示子类目郑州外语网站建站优化
  • 做跨国婚恋网站赚钱吗鸿邑科技 网站建设
  • 做地方网站论坛赚钱网站建设需要注意的
  • php网站开发实例报告wordpress连接微博专业版v4.1
  • 苏州关键词优化平台北京朝阳建站优化
  • 做游戏代练的网站易班网站的建设内容
  • 国外做油画的网站网站图片搜索技术哪里可以做
  • 网站策划培训北京网站开发企业
  • 网站做得好的公司wordpress文字居中
  • 网站怎么添加导航栏网站建设需求分析的实施
  • 公司网站建立的建议百度网页电脑版入口
  • 怎么建立一个网站能够与讯飞云对话大企业门户网站建设
  • .net 手机网站源码下载深圳杰恩创意设计有限公司网站