>
> UTF8 is a variable-width encoding so if the buffer is >100kB and a valid
> multi-byte UTF8 encoded character happens to fall across the boundary of
> buffers in subsequent loop iterations you might get either an incorrect
> decoding or an exception thrown.
>
Right, decoding the bytes in fixed
.@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com>
[mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Kean
Sent: Wednesday, 11 September 2013 2:20 AM
To: ozDotNet
Subject: RE: out of memory..urgent
Memory isn't unlimited. Basically, when you convert from a byte array ->
stri
*Sent:* Wednesday, 11 September 2013 2:20 AM
*To:* ozDotNet
*Subject:* RE: out of memory..urgent
Memory isn't unlimited. Basically, when you convert from a byte array
-> string, you have two copies of the same data (one for the byte
array and one for the string) in memory.
What exa
Thanks Mike..will implement your advice..just being lazy
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On
Behalf Of mike smith
Sent: Friday, 13 September 2013 5:13 PM
To: ozDotNet
Subject: Re: out of memory..urgent...Solution
Like this.
http
otNet
Subject: Re: out of memory..urgent...Solution
I am surprised this solves your memory problem, as although the UTF8
GetString(Byte[]) defers to Encoding's base method, that returns the result
of GetString(Byte[], int, int) which is overridden by UTF8, which calls
String.CreateStringFromEncod
nd is intended only for use of the addressee.
> If you are not the intended recipient, you are hereby notified that any
> disclosure, reproduction, distribution or other use of this communication is
> strictly prohibited.
> If you have received this communication in error, please notify th
@ozdotnet.com] *On Behalf Of *mike smith
> *Sent:* Friday, 13 September 2013 4:50 PM
> *To:* ozDotNet
> *Subject:* Re: out of memory..urgent...Solution
>
> ** **
>
> Are you doing something odd with generational garbage collection here? **
> **
>
> ** **
>
...@ozdotnet.com] On
Behalf Of mike smith
Sent: Friday, 13 September 2013 4:50 PM
To: ozDotNet
Subject: Re: out of memory..urgent...Solution
Are you doing something odd with generational garbage collection here?
On Fri, Sep 13, 2013 at 2:46 PM, wrote:
If you are interested..memeory issue was
intended recipient, you are hereby notified that any
> disclosure, reproduction, distribution or other use of this communication
> is strictly prohibited.
> If you have received this communication in error, please notify the sender
> by reply transmission and delete the message without copying or disclosin
David Kean
Sent: Wednesday, 11 September 2013 2:20 AM
To: ozDotNet
Subject: RE: out of memory..urgent
Memory isn't unlimited. Basically, when you convert from a byte array ->
string, you have two copies of the same data (one for the byte array and one
for the string) in memory.
What ex
Memory isn't unlimited. Basically, when you convert from a byte array ->
string, you have two copies of the same data (one for the byte array and one
for the string) in memory.
What exactly are you doing? You are typically better off chunking and reading
smaller amounts of data at a time. Use s
Thanks people..going through all these options...let hope it fixes it...i'll
keep you informed..
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Greg Keogh
Sent: Tuesday, 10 September 2013 2:48 PM
To: ozDotNet
Subject: Re: out of memory..urgent
This is the utf8 validation I was thinking of -- Greg
http://msdn.microsoft.com/en-us/library/302sbf78.aspx
On 10 September 2013 14:00, wrote:
> Not sure if it’s of use in this case but you can use
> char.GetUnicodeCategory to check validity of a Unicode character
>
>
> var validCharacter = 'q
Not sure if it’s of use in this case but you can use char.GetUnicodeCategory to
check validity of a Unicode character
varvalidCharacter='q';
varucCategory=char.GetUnicodeCategory(validCharacter);
varisValidUnicode=ucCategory!=UnicodeCategory.OtherNotAssigned;
varinvalidCharacter=(char) 8
Does the byte[] actually represent a valid utf-8 string? There are ways of
validating, but I can't remember off the top of my head. You can also code
Encoding.UTF8.Getstring() as there is a static member for convenience --
Greg
On 10 September 2013 13:04, wrote:
> Getting out of memory exceptio
You should consider working with streams and a fixed buffer size rather than
the encoding the whole thing at once.
Cheers,
Shane
On 10/09/2013, at 1:04 PM, wrote:
> Getting out of memory exception when I try to
>
> Dim s as string
> Dim b() as Byte
>
> s=System.Text.Encoding.GetEnco
16 matches
Mail list logo