PersistencyManager Encoding?


Author
Message
Jason Irby
Jason Irby
Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)
Group: Forum Members
Posts: 59, Visits: 77

What encoding does PersistencyManager expect the Stream to be in for LoadFromStream and SaveToStream?

 

I have a string field in a DB table that I am supposed to load/save my diagram into as customXML.

On load, I create the MemoryStream for the String using System.Text.Encoding.Default.  I then tell PersistencyManager to LoadFromStream.  This works but seems brittle.  I would like to specify the encoding as Unicode instead of default but have had problems doing it this way.

 

1.      It acts as if the PersistencyManager is expecting UTF-7.  Is this true?  Does it assume Utf-7 explicitly, or does it also just use whatever the System encoding default is? (Which seems to be Utf-7 on my machine currently.)  

 

2.       Can I force PersistencyManager to assume Unicode?  There is a serialization filter param but the examples don’t use it and the docs are unclear.  Can I tell PM to always read/write to stream as Unicode?  If so, can you give me an example?

 

Thanks in advance,

Jason

 

 


 


Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Jason,

The serialization uses the default XML document encoding - UTF8.



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search