Projekt „Nový hledač“
Kódování a převody kódů

Obecně

http://www.google.cz/#hl=cs&xhr=t&q=charset
http://en.wikipedia.org/wiki/Character_encoding
http://www.google.cz/#sclient=psy&hl=cs&q=charset+values
http://devfiles.myopera.com/articles/554/httpheaders-charsetvalue-url.htm
http://diskuse.jakpsatweb.cz/?action=vthread&forum=9&topic=104412
http://www.google.cz/search?hl=cs&biw=1276&bih=762&q=Encoding

http://en.wikipedia.org/wiki/Code
http://en.wikipedia.org/wiki/Character_encoding
http://esperanto.czechian.net/utf-8.html
http://msdn.microsoft.com/en-us/library/system.text.encoding.convert%28v=vs.71%29.aspx
Encoding.Convert Method

.NET Framework 1.1

Converts a byte array from one encoding to another.
Overload List
Converts a byte array from one encoding to another.
Supported by the .NET Compact Framework.
[Visual Basic] Overloads Public Shared Function Convert(Encoding, Encoding, Byte()) As Byte()
[C#] public static byte[] Convert(Encoding, Encoding, byte[]);
[C++] public: static unsigned char Convert(Encoding*, Encoding*, unsigned char __gc[]) __gc[];
[JScript] public static function Convert(Encoding, Encoding, Byte[]) : Byte[];
Converts a range of bytes in a byte array from one encoding to another.
Supported by the .NET Compact Framework.
[Visual Basic] Overloads Public Shared Function Convert(Encoding, Encoding, Byte(), Integer, Integer) As Byte()
[C#] public static byte[] Convert(Encoding, Encoding, byte[], int, int);
[C++] public: static unsigned char Convert(Encoding*, Encoding*, unsigned char __gc[], int, int) __gc[];
[JScript] public static function Convert(Encoding, Encoding, Byte[], int, int) : Byte[];

Codes – tables of characters

http://www.science.co.il/language/character-code.asp?s=1250
http://www.utf8-chartable.de/unicode-utf8-table.pl?number=1024

C#


Obecně


http://www.google.cz/search?hl=cs&source=hp&biw=1276&bih=762&q=c%23+Encoding
http://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.71%29.aspx
http://www.google.cz/#sclient=psy&hl=cs&q=C%23+WebClient+how+to+covert+code+to+UTF8%3F

Detecting of code


Je to parametr v konstrukci StreamReader.
public StreamReader(

               Stream stream,

               Encoding encoding,

               bool detectEncodingFromByteOrderMarks,

               int bufferSize

)
The detectEncodingFromByteOrderMarks parameter detects the encoding by looking at the first three bytes of the stream. It automatically recognizes UTF-8, little-endian Unicode, and big-endian Unicode text if the file starts with the appropriate byte order marks. Otherwise, the user-provided encoding is used. See the Encoding.GetPreamble method for more information.

http://www.google.cz/search?hl=cs&biw=1276&bih=737&q=DetectEncodingFromByteOrderMarks
http://msdn.microsoft.com/en-us/library/ms143458.aspx
http://msdn.microsoft.com/en-us/library/9y86s1a9.aspx
http://www.eggheadcafe.com/software/aspnet/32319488/using-detectencodingfrombyteordermarks-while-copying-a-text-file.aspx
http://www.eggheadcafe.com/searchform.aspx?search=DetectEncodingFromByteOrderMarks
http://brianary.blogspot.com/2008/08/efficacy-of-streamreaders.html
http://bytes.com/topic/c-sharp/answers/813249-using-detectencodingfrombyteordermarks-while-copying-text-file
http://www.pcreview.co.uk/forums/using-detectencodingfrombyteordermarks-while-copying-text-file-t3531778.html
http://projektysipvz.gytool.cz/ProjektySIPVZ/Default.aspx?uid=813
http://www.123aspx.com/rotor/src/streamreader.cs.txt
http://207.46.16.252/en-us/library/ee822159%28BTS.10%29.aspx

Codes – tables of characters

http://www.science.co.il/language/character-code.asp?s=1250
http://www.utf8-chartable.de/unicode-utf8-table.pl?number=1024

CodePageEncoding

http://www.google.cz/#sclient=psy&hl=cs&site=&source=hp&q=BaseCodePageEncoding
http://www.google.cz/#sclient=psy&hl=cs&site=&source=hp&q=BaseCodePageEncoding
http://www.google.cz/#sclient=psy&hl=cs&q=System.Text.SBCSCodePageEncoding
http://en.wikipedia.org/wiki/SBCS
http://labs.developerfusion.co.uk/SourceViewer/browse.aspx?assembly=SSCLI&namespace=System.Text&type=SBCSCodePageEncoding

Encoding Class

http://social.msdn.microsoft.com/Search/en-US?query=Encoding

http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx
http://msdn.microsoft.com/en-us/library/system.text.encoding%28VS.80%29.aspx
http://msdn.microsoft.com/en-us/library/system.text.encoding%28VS.95%29.aspx
http://msdn.microsoft.com/en-US/library/system.text.encoding%28v=VS.80%29.aspx
http://msdn.microsoft.com/en-us/library/system.text.encoding.ascii.aspx
http://msdn.microsoft.com/en-us/library/system.text.encoding%28v=VS.71%29.aspx
Represents a character encoding.
For a list of all members of this type, see Encoding Members.
System.Object
System.Text.Encoding
System.Text.ASCIIEncoding
System.Text.UnicodeEncoding
System.Text.UTF7Encoding
System.Text.UTF8Encoding
http://msdn.microsoft.com/en-us/library/system.text.encoding.convert%28v=vs.71%29.aspx
.NET Framework 1.1
Other Versions

Represents a character encoding.
For a list of all members of this type, see Encoding Members.
System.Object
   System.Text.Encoding
      System.Text.ASCIIEncoding
      System.Text.UnicodeEncoding
      System.Text.UTF7Encoding
      System.Text.UTF8Encoding
[Visual Basic]
<Serializable>
MustInherit Public Class Encoding
[C#]
[Serializable]
public abstract class Encoding
[C++]
[Serializable]
public __gc __abstract class Encoding
[JScript]
public
 Serializable
abstract class Encoding

Encoding C# strings as Byte[] (Byte Arrays) and back again  - 3

http://www.dijksterhuis.org/encoding-c-strings-as-byte-byte-arrays-and-back-again/

Methods GetEncoding and SetEncoding

http://www.google.cz/#sclient=psy&hl=cs&q=C%23+GetEncoding
http://msdn.microsoft.com/en-us/library/system.text.encoding.getencodings.aspx
http://msdn.microsoft.com/cs-cz/library/system.text.encodinginfo.getencoding.aspx
http://msdn.microsoft.com/en-us/library/wzsz3bk3.aspx
http://msdn.microsoft.com/en-us/library/system.text.encoding.getencoding%28v=VS.71%29.aspx
http://www.google.cz/#sclient=psy&hl=cs&q=C%23+SetEncoding
http://msdn.microsoft.com/en-us/library/system.text.encoding.convert%28v=vs.71%29.aspx
http://www.eggheadcafe.com/community/aspnet/2/47440/how-to-change-the-encoding-of-a-string.aspx
http://msdn.microsoft.com/en-us/library/system.text.encoding.getencoding.aspx
http://msdn.microsoft.com/en-us/library/system.text.encoding.codepage%28v=vs.80%29.aspx

Class WebClient – Atribute Encoding

http://msdn.microsoft.com/en-us/library/system.net.webclient.encoding%28v=vs.80%29.aspx
Note: This property is new in the .NET Framework version 2.0.
Gets and sets the Encoding used to upload and download strings.
Namespace: System.Net
Assembly: System (in system.dll)
Syntax:
C#
public Encoding Encoding { get; set; }
C++
No code example is currently available or this language may not be supported.
C#
public static void UploadString (string address)
{
string data = "Time=12:00am temperature = 50";
  WebClient client=new WebClient ();
  // Optionally specify an encoding for uploading and downloading strings.
  client.Encoding=System.Text.Encoding.UTF8;
  // Upload the data.
  string reply=client.UploadString (address, data);
  // Disply the server's response.
  Console.WriteLine(reply);
}

CodePageEncoding

http://www.google.cz/#sclient=psy&hl=cs&site=&source=hp&q=BaseCodePageEncoding
http://www.google.cz/#sclient=psy&hl=cs&site=&source=hp&q=BaseCodePageEncoding
http://www.google.cz/#sclient=psy&hl=cs&q=System.Text.SBCSCodePageEncoding
http://en.wikipedia.org/wiki/SBCS
http://labs.developerfusion.co.uk/SourceViewer/browse.aspx?assembly=SSCLI&namespace=System.Text&type=SBCSCodePageEncoding

Poznáváme C# a Microsoft .NET

http://poznavame-c-msnet.wz.cz
//nacteme URI zdroje
Console.Write("Zadejte URI (napr. ) : ");
string uri = Console.ReadLine();
try
{
  Console.WriteLine("Stahuji {0} ...", uri);
  //stahneme data jako pole bajtu
  byte[] data = client.DownloadData(uri);
  Console.WriteLine("Velikost nactenych dat : {0} bajtu", data.Length);
  //prevedeme pole bajtu na text
  string textContent = Encoding.ASCII.GetString(data);
  Console.WriteLine(textContent);
}
catch(WebException ex)
{
  Console.WriteLine("Pri stahovani souboru doslo k vyjimce : {0}", ex.ToString());
}