J
Jeffrey Walton
Hi All,
Here's the solution I've been able to put together thanks to Jon
Skeet. Poseted in case anyone else wanders upon this (or the previous
thread) while grepping the web for the solution.
Jeff
Jeffrey Walton
// Many thanks to Jon Skeet for the hand holding
private string GetT61String()
{
StringBuilder builder = new StringBuilder();
// CodePage Number: 20261, Name: x-cp20261, DisplayName: T.61
// See http://msdn2.microsoft.com/en-us/library/system.text.encodinginfo.aspx
StreamReader reader = new StreamReader(
new MemoryStream( Value, false ), // Byte[], Boolean writeable
Encoding.GetEncoding(20261)
);
int nBytesRead = 0;
char[] buffer = new char[BUFFER_SIZE];
while (0 != ( nBytesRead = reader.Read(buffer, 0, BUFFER_SIZE) ))
{
builder.Append(buffer, 0, nBytesRead);
}
reader.Close();
return builder.ToString();
}
Here's the solution I've been able to put together thanks to Jon
Skeet. Poseted in case anyone else wanders upon this (or the previous
thread) while grepping the web for the solution.
Jeff
Jeffrey Walton
// Many thanks to Jon Skeet for the hand holding
private string GetT61String()
{
StringBuilder builder = new StringBuilder();
// CodePage Number: 20261, Name: x-cp20261, DisplayName: T.61
// See http://msdn2.microsoft.com/en-us/library/system.text.encodinginfo.aspx
StreamReader reader = new StreamReader(
new MemoryStream( Value, false ), // Byte[], Boolean writeable
Encoding.GetEncoding(20261)
);
int nBytesRead = 0;
char[] buffer = new char[BUFFER_SIZE];
while (0 != ( nBytesRead = reader.Read(buffer, 0, BUFFER_SIZE) ))
{
builder.Append(buffer, 0, nBytesRead);
}
reader.Close();
return builder.ToString();
}