none
Character Display in old application

    Question

  • Hi there,

    I am continuing updates on a VB6 program MyReels: at http://www.ozemail.com.au/~lmstearn.

    It runs surprisingly well under Windows 8.1 for XPSP3 compatibility.

    Unfortunately, there are now problems with character display that weren't seen in Win 8.0 or prior.

    For example

    Ellipsis "…" now displays as

    ligature "æ" now displays as

    (The two vertical lines on the right in the images can be ignored.)

    Is there some kind of compatibility patch I can use to correct this?

    Thanks for your interest!


    A natural, B flat, C sharp, D compile

    Friday, August 29, 2014 2:18 PM

Answers

  • Thanks Kate Li,

    The program is so old that it won't port to VS. I can fiddle with it on an older machine, but, really the problem lies with these characters being processed in text files with VB6. The text files with the characters are saved through Notepad++ default settings (UTF8 without BOM etc). The following might elucidate:

    When displaying a string, the standard VB6 textbox and label controls do an implicit (and internal) conversion from Unicode to ANSI.

    Here's what happens when displaying the following:

    æ (00E6)
    … (2026)


    We get:

    æ (20AC 00A6)
    … (00E2 20AC 00A6)

    Note that the ellipsis becomes à (a-tilde)  20AC + pipe

    The diphthong becomes two characters â (small A with circumflex) and € (euro currency) + pipe

    It turns out that this is precisely the ANSI coding for the two characters.

    <cough> Jogging my memory now,  this was always a problem with VB6, and is not specific to Win 8.1 but to any OS from XP onwards.

    Pasting the characters directly into textboxes in the program and displaying them does not reproduce the error, only the method used to read files from disk.

    Thanks again for your interest,

    LMS


    A natural, B flat, C sharp, D compile


    • Edited by LaurieSt Wednesday, September 03, 2014 11:31 AM
    • Marked as answer by LaurieSt Wednesday, September 03, 2014 11:31 AM
    Monday, September 01, 2014 12:10 PM
  • Hi,

    This could be the encoding issue.

    I have found another issue that Notepad++ was using ANSI encoding, possibly the files that you got also somehow was set to ANSI encoding. By using Notepad++ and converting all VB files to UTF-8 encoding may help you.


    Kate Li
    TechNet Community Support

    • Marked as answer by LaurieSt Wednesday, September 03, 2014 11:31 AM
    Wednesday, September 03, 2014 5:56 AM
    Moderator

All replies

  • Hi,

    This issue can be caused by encoding or compatibility issue.

    Please check the similar issue in this thread:

    http://stackoverflow.com/questions/5882014/why-does-internet-explorer-9-show-weird-characters-on-utf8-and-whitespace-conten

    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    If your issue wasn't resolved, I suggest you submit new case on MSDN VB development support.

    http://social.msdn.microsoft.com/Forums/en-US/home?forum=vbgeneral

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.  Thank you for your understanding.


    Kate Li
    TechNet Community Support

    Monday, September 01, 2014 7:59 AM
    Moderator
  • Thanks Kate Li,

    The program is so old that it won't port to VS. I can fiddle with it on an older machine, but, really the problem lies with these characters being processed in text files with VB6. The text files with the characters are saved through Notepad++ default settings (UTF8 without BOM etc). The following might elucidate:

    When displaying a string, the standard VB6 textbox and label controls do an implicit (and internal) conversion from Unicode to ANSI.

    Here's what happens when displaying the following:

    æ (00E6)
    … (2026)


    We get:

    æ (20AC 00A6)
    … (00E2 20AC 00A6)

    Note that the ellipsis becomes à (a-tilde)  20AC + pipe

    The diphthong becomes two characters â (small A with circumflex) and € (euro currency) + pipe

    It turns out that this is precisely the ANSI coding for the two characters.

    <cough> Jogging my memory now,  this was always a problem with VB6, and is not specific to Win 8.1 but to any OS from XP onwards.

    Pasting the characters directly into textboxes in the program and displaying them does not reproduce the error, only the method used to read files from disk.

    Thanks again for your interest,

    LMS


    A natural, B flat, C sharp, D compile


    • Edited by LaurieSt Wednesday, September 03, 2014 11:31 AM
    • Marked as answer by LaurieSt Wednesday, September 03, 2014 11:31 AM
    Monday, September 01, 2014 12:10 PM
  • Hi,

    This could be the encoding issue.

    I have found another issue that Notepad++ was using ANSI encoding, possibly the files that you got also somehow was set to ANSI encoding. By using Notepad++ and converting all VB files to UTF-8 encoding may help you.


    Kate Li
    TechNet Community Support

    • Marked as answer by LaurieSt Wednesday, September 03, 2014 11:31 AM
    Wednesday, September 03, 2014 5:56 AM
    Moderator