Results 1 to 4 of 4

Thread: NOBODY KNOWS! Displaying UNICODE in ACTIVEX Contro

  1. #1
    Brian Ward bward@paradux Guest

    Default NOBODY KNOWS! Displaying UNICODE in ACTIVEX Contro

    Nobody knows? That&#039;s what it looks like.<BR><BR>Can someone tell be the best way of displaying unicode characters in an activex control? What I have is unicode characters in a SQL database, which I can correctly display on the asp using @Codepage = 650001. <BR><BR>The only way that I can think of is to do a character conversion (Hex to Decimal) for the specific language that I&#039;m working with (Hebrew) such as (using a dictionary object): <BR><BR>dHC.Add &h0000, &h00 <BR>dHC.Add &h0001, &h01 <BR>dHC.Add &h0002, &h02 <BR>dHC.Add &h0003, &h03 <BR>dHC.Add &h0004, &h04 <BR>dHC.Add &h0005, &h05 <BR>dHC.Add &h0006, &h06 <BR>dHC.Add &h0007, &h07 <BR>dHC.Add &h0008, &h08 <BR><BR>For z = 1 to Len(sUniCodeString) <BR> If dHC.Exists(AscW(Mid(sUniCodeString, z, 1))) Then <BR> CharConvert = CharConvert & ChrW(dHC.Item(AscW(Mid(sUniCodeString, z, 1)))) <BR> Else <BR> CharConvert = CharConvert & "." <BR> End If <BR>Next <BR><BR>------- <BR>And then take this string and pass it to the active-x control and display using a uni-code font such as Lucida Sans Unicode (with the appropriate character set (177 = Hebrew)), or a strictly hebrew font (such as David).<BR><BR>This is how I am currently accomplishing ... however, it&#039;s not very reliable, and I wish there was an easier way. <BR><BR>Any suggestions? (Nobody seems to know how to do this) <BR><BR>Thanks, <BR>Brian W. Ward <BR>

  2. #2
    Join Date
    Dec 1969

    Default @Codepage should work...

    I prefer to use Session.CodePage, but whatever.<BR><BR>Anyway, if you then have a Unicode string in your ASP code, *supposedly* simply doing Response.Write of that string, after selecting the code page, should send out the characters properly.<BR><BR>I did this extensively with Japanese last Fall, where the characters are even 16 bits wide, and it all worked just fine!<BR><BR>WHERE is this ActiveX control you refer to? Client side or server side? How do you try to pass the string to it???<BR><BR>Are you sure the problem isn&#039;t in the control?<BR><BR>

  3. #3
    Brian Ward Guest

    Default RE: @Codepage should work...

    I&#039;m having NO problems with unicode on the ASP ... passing UNICODE to the ActiveX control is the problem. It is on the client side ... I am writing/have written the activex control, and my question is:<BR><BR>HOW DO I DISPLAY UNICODE CHARACTERS IN AN ACTIVEX CONTROL? WITH WHAT FONT? HOW? HELP! PLEASE!<BR>

  4. #4
    Join Date
    Dec 1969

    Default Oh! Misread the question!

    Sorry...I have *never* written or used a client-side ActiveX control (as we *must* write code that works in all browsers on all platforms).<BR><BR>The *only* question I have: Is the control *getting* the Unicode characters? That is, have you tested by building a version that dumps out (for example) the hex form of the characters, to verify that it is actually getting Unicode?<BR><BR>As for the display...I&#039;d bet you&#039;ll have to try to get that answer from VB or VisualC++ gurus, depending on what you are using to create the control.<BR><BR>SOrry I stepped into this one. Possibly kept others from answering. If you don&#039;t get any responses, I&#039;d try the Advanced forum and/or the ASP Components forum. Or maybe even the COM/COM+ forum? But, as I said, you may be stuck looking at VB or C++ groups.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts