zoukankan      html  css  js  c++  java
  • 解决Silverlight和WP不支持GBP312 的问题

    Project Description This class is for support GB2312 simplified Chinese characters for Silverlight(include Windows Phone 7) Application and inherited from Encoding abstract class. It's developed in CSharp.
    这个类能够让 Silverlight(包含 Windows Phone 7)应用程序支持 GB2312 简体中文字符集,从 Encoding 抽象类继承。使用 C# 语言编写。
    GB2312Encoding is fully implemented all Encoding functions therefore you can uses it as easy as system built-in Encoding features. In order to use the GB2312Encoding, you must embed an addition data file in your assembly. Following features has been implemented:

    • Immediate decode array bytes and encode string or array chars
    • Simple use StreamReader and StreamWriter read and write stream

    GB2312Encoding 类完整的实现了 Encoding 的所有功能,因此你可以很容易的实现所有的字符集编码功能。为了使用 GB2312Encoding,你必须嵌入一个附加的数据文件到你的程序集。 本程序实现了下列功能:

    • 解码字节数组和编码字符串或字符数组
    • 使用 StreamReaderStreamWriter 对流进行读写操作

    Sample(例子):

    WebClient _wc = new WebClient();
    _wc.Encoding = new GB2312.GB2312Encoding();
    _wc.DownloadStringCompleted += (ss, ee) => txtResult.Text = ee.Result;
    _wc.DownloadStringAsync(new Uri(txtUrl.Text));
    

    How to use:

    Copy GB2312Encoding.cs and gb2312.bin files into your project and make sure:

    • gb2312.bin file’s build actionis “Embedded Resource”
    • gb2312.binfilename correct(cannot modify filename)
    • GB2312Encoding.cs and gb2312.bin files in same folder

    如何使用:

    GB2312Encoding.csgb2312.bin 文件复制到你的项目并确保

    • gb2312.bin 文件的生成操作是“嵌入的资源”
    • gb2312.bin文件的文件名正确(不能修改此文件名)
    • GB2312Encoding.csgb2312.bin 文件在同一个文件夹

    来自,请查看并下载类文件。http://gb2312.codeplex.com/ 

  • 相关阅读:
    蓝书3.6 割点与桥
    蓝书3.5 强连通分量
    蓝书3.4 差分约束系统
    蓝书3.3 SPFA算法的优化
    蓝书3.2 最短路
    蓝书3.1 最小生成树
    luogu 4630 [APIO2018] Duathlon 铁人两项
    Codeforces Round #124 (Div. 1) C. Paint Tree(极角排序)
    dutacm.club Water Problem(矩阵快速幂)
    dutacm.club 1094: 等差区间(RMQ区间最大、最小值,区间GCD)
  • 原文地址:https://www.cnblogs.com/hfutwyy/p/2348137.html
Copyright © 2011-2022 走看看