Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Problem with TLMDWideStrings.LoadFromStream

Hello,

Problem with TLMDWideStrings.LoadFromStream(Stream: TStream) method.
Using BDS2006 with LMD_UNICODE and WideStrings to store unicode strings.
1. We have UTF8 encoded text stream without BOM.
2. We created an object and trying to load our text
lst := TLMDWideStringsList.Create
lst.SaveUnicode := true;
lst.UnicodeFormat := sufUTF8;
lst.LoadFromStream(my_stream);
In result strings are not converted to WideString type.
Function LMDConvertUTF8String which called in method TLMDWideStrings.LoadFromStream(Stream: TStream);
working incorrectly. It checks BOM again, but we have no BOM, and se set properties of lst object to
work without BOM. Here is the problem.

Thank you.

Comments

Sign In or Register to comment.