Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Wed, 23 Jul 2008 12:18:58 -0500,    group: microsoft.public.platformsdk.shell        back       


Vista - Strange characters showing up in text returned by IQueryInfo::GetInfoTip   
Hello,

In Windows XP this problem has not arisen; however, when calling
IQueryInfo::GetInfoTip in Windows Vista the text returned has (after 
being converted to ANSI CString) several misplaced question marks.  It 
looks like this:

Type: Microsoft Office Excel Comma Separated Values File
Size: 11.1 MB
Date modified: ?7/?21/?2008 ??11:32 AM

Out of curiosity I dumped out the wide character string in hex form, and 
what I found was that several 0x0E20 or 0x0F20 characters were appearing 
in the info tip.

54 00 79 00 70 00 65 00 3A 00 20 00 4D 00 69 00  T.y.p.e.:. .M.i.
63 00 72 00 6F 00 73 00 6F 00 66 00 74 00 20 00  c.r.o.s.o.f.t. .
4F 00 66 00 66 00 69 00 63 00 65 00 20 00 45 00  O.f.f.i.c.e. .E.
78 00 63 00 65 00 6C 00 20 00 43 00 6F 00 6D 00  x.c.e.l. .C.o.m.
6D 00 61 00 20 00 53 00 65 00 70 00 61 00 72 00  m.a. .S.e.p.a.r.
61 00 74 00 65 00 64 00 20 00 56 00 61 00 6C 00  a.t.e.d. .V.a.l.
75 00 65 00 73 00 20 00 46 00 69 00 6C 00 65 00  u.e.s. .F.i.l.e.
0A 00 53 00 69 00 7A 00 65 00 3A 00 20 00 31 00  ..S.i.z.e.:. .1.
31 00 2E 00 31 00 20 00 4D 00 42 00 0A 00 44 00  1...1. .M.B...D.
61 00 74 00 65 00 20 00 6D 00 6F 00 64 00 69 00  a.t.e. .m.o.d.i.
66 00 69 00 65 00 64 00 3A 00 20 00 0E 20 37 00  f.i.e.d.:. .. 7.
2F 00 0E 20 32 00 31 00 2F 00 0E 20 32 00 30 00  /.. 2.1./.. 2.0.
30 00 38 00 20 00 0F 20 0E 20 31 00 31 00 3A 00  0.8. .. . 1.1.:.
33 00 32 00 20 00 41 00 4D 00 00 00              3.2. .A.M...

I assume that the ::WideCharToMultiByte call inside of the _wcstombsz 
call inside of CString::CString(LPCWSTR lpsz) is replacing any unknown 
characters with '?'.

What can I do to avoid these strange characters from appearing in the 
text returned by GetInfoTip?
date: Wed, 23 Jul 2008 12:18:58 -0500   author:   Jeffrey Deal am

Re: Vista - Strange characters showing up in text returned by IQueryInfo::GetInfoTip   
200E -> Left-To-Right mark

200f -> Right-to-Left mark

So the text is correct Unicode text, and these characters should not 
show up if used correctly.

Christian



"Jeffrey Deal" <sti@nospam.nospam> wrote in message 
news:OGSt2gO7IHA.2064@TK2MSFTNGP02.phx.gbl...
> Hello,
>
> In Windows XP this problem has not arisen; however, when calling
> IQueryInfo::GetInfoTip in Windows Vista the text returned has (after
> being converted to ANSI CString) several misplaced question marks. 
> It
> looks like this:
>
> Type: Microsoft Office Excel Comma Separated Values File
> Size: 11.1 MB
> Date modified: ?7/?21/?2008 ??11:32 AM
>
> Out of curiosity I dumped out the wide character string in hex form, 
> and
> what I found was that several 0x0E20 or 0x0F20 characters were 
> appearing
> in the info tip.
>
> 54 00 79 00 70 00 65 00 3A 00 20 00 4D 00 69 00  T.y.p.e.:. .M.i.
> 63 00 72 00 6F 00 73 00 6F 00 66 00 74 00 20 00  c.r.o.s.o.f.t. .
> 4F 00 66 00 66 00 69 00 63 00 65 00 20 00 45 00  O.f.f.i.c.e. .E.
> 78 00 63 00 65 00 6C 00 20 00 43 00 6F 00 6D 00  x.c.e.l. .C.o.m.
> 6D 00 61 00 20 00 53 00 65 00 70 00 61 00 72 00  m.a. .S.e.p.a.r.
> 61 00 74 00 65 00 64 00 20 00 56 00 61 00 6C 00  a.t.e.d. .V.a.l.
> 75 00 65 00 73 00 20 00 46 00 69 00 6C 00 65 00  u.e.s. .F.i.l.e.
> 0A 00 53 00 69 00 7A 00 65 00 3A 00 20 00 31 00  ..S.i.z.e.:. .1.
> 31 00 2E 00 31 00 20 00 4D 00 42 00 0A 00 44 00  1...1. .M.B...D.
> 61 00 74 00 65 00 20 00 6D 00 6F 00 64 00 69 00  a.t.e. .m.o.d.i.
> 66 00 69 00 65 00 64 00 3A 00 20 00 0E 20 37 00  f.i.e.d.:. .. 7.
> 2F 00 0E 20 32 00 31 00 2F 00 0E 20 32 00 30 00  /.. 2.1./.. 2.0.
> 30 00 38 00 20 00 0F 20 0E 20 31 00 31 00 3A 00  0.8. .. . 1.1.:.
> 33 00 32 00 20 00 41 00 4D 00 00 00              3.2. .A.M...
>
> I assume that the ::WideCharToMultiByte call inside of the 
> _wcstombsz
> call inside of CString::CString(LPCWSTR lpsz) is replacing any 
> unknown
> characters with '?'.
>
> What can I do to avoid these strange characters from appearing in 
> the
> text returned by GetInfoTip?
date: Thu, 24 Jul 2008 09:54:47 +0200   author:   Christian Kaiser

Re: Vista - Strange characters showing up in text returned by IQueryInfo::GetInfoTip   
On 24 Jul, 08:54, "Christian Kaiser"  wrote:
> 200E -> Left-To-Right mark
> 200f -> Right-to-Left mark
>
> So the text is correct Unicode text, and these characters should not
> show up if used correctly.
>

problem is that they _do_ show up, I've seen it many times all over
the place, especially with dates. There must be a windows component
that turns things to ANSI and back, even in unicode program builds,
that's why you get the question marks. The best I found was a
workaround, removing these characters after the fact
http://blogs.msdn.com/benkaras/archive/2006/10/10/Properties-coding-expedition-_2D00_-Stripping-characters.aspx

hth
nikos

---
www.zabkat.com
date: Fri, 25 Jul 2008 05:17:22 -0700 (PDT)   author:   nikos

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us