Question

Here

What is causing this weird symbol occurring at the beginning of the array?

It occurs with Unicode character and Multibyte character sets. It's stopping me from being able to compare it to another array.

Edit: Google gave me nothing when researching "comparing Unicode strings c++".

I've also looked at historical weird symbols that have occured with wchar_ts, and they are sparse as well.

Edit: Visual studio 2010, Windows 7, code can't be shown. It's part of a structured storage file stream name.

I've given all the information I can. I'm opening and enumerating a structured storage file, and that wchar_t array is the pwcsName value once that stream has been enumerated. I'm looking for a way to compare it to "SummaryInformation". That symbol is in the way.

A possible solution I have thought of is creating a substring starting at the second char in the array, but I'm unsure as to how to go about doing that.

Was it helpful?

Solution

Read here about Windows Structured Storage:

http://msdn.microsoft.com/en-gb/library/windows/desktop/aa380020(v=vs.85).aspx

In particular, the name parameter:-

A pointer to a wide character null-terminated Unicode string that contains the name of the newly created stream. The name can be used later to open or reopen the stream. The name must not exceed 31 characters in length, not including the string terminator. The 000 through 01f characters, serving as the first character of the stream/storage name, are reserved for use by OLE. This is a compound file restriction, not a structured storage restriction.

So it's a reserved OLE name in some form. I don't know enough about structured storage to help you more, though.

OTHER TIPS

That symbol is used to display a code point that does not have a glyph in the selected font. For example, the code point could be non-printable, or it could be a character from a language that is not included in the font your debugger is using.

It's impossible to say what the code point actually is from here. You will need to write some diagnostics code, or inspect in the debugger to find out what it really is.

In order to resolve the problem you'll need to track down where these strings are coming from. And then look to find out what you are doing wrong. It does look rather like an off-by-one error in your code. In other word, perhaps the string actually starts one character later than your code thinks it does.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top