diff options
author | Jon Skeet <skeet@pobox.com> | 2015-06-17 15:34:29 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-06-17 15:34:29 +0100 |
commit | a0f956932df52ead0223a68243b5862c7b037cf1 (patch) | |
tree | 936dbb844dbe79d2493b2addf528654523df6968 /csharp/src/ProtocolBuffers/CodedInputStream.cs | |
parent | a09b491080b5756d19c132f840ede5a7920b8d87 (diff) | |
download | protobuf-a0f956932df52ead0223a68243b5862c7b037cf1.tar.gz protobuf-a0f956932df52ead0223a68243b5862c7b037cf1.tar.bz2 protobuf-a0f956932df52ead0223a68243b5862c7b037cf1.zip |
Use our "local" copy of Encoding.UTF8 in CodedInputStream too.
Diffstat (limited to 'csharp/src/ProtocolBuffers/CodedInputStream.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers/CodedInputStream.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/csharp/src/ProtocolBuffers/CodedInputStream.cs b/csharp/src/ProtocolBuffers/CodedInputStream.cs index 447adbb1..56283318 100644 --- a/csharp/src/ProtocolBuffers/CodedInputStream.cs +++ b/csharp/src/ProtocolBuffers/CodedInputStream.cs @@ -339,12 +339,12 @@ namespace Google.Protobuf {
// Fast path: We already have the bytes in a contiguous buffer, so
// just copy directly from it.
- String result = Encoding.UTF8.GetString(buffer, bufferPos, size);
+ String result = CodedOutputStream.Utf8Encoding.GetString(buffer, bufferPos, size);
bufferPos += size;
return result;
}
// Slow path: Build a byte array first then copy it.
- return Encoding.UTF8.GetString(ReadRawBytes(size), 0, size);
+ return CodedOutputStream.Utf8Encoding.GetString(ReadRawBytes(size), 0, size);
}
/// <summary>
|