Characters appear like "?" in a TextEditor programmed in C++

Posted on 2014-07-10
Last Modified: 2015-02-13
Hi Experts,

In 2006 I downloaded the text editor "Neatpad" by James Brown and it compiled and worked correctly:

Here is the link to the Neatpad:

It's implemented with VC6.

Now I downloaded it again and compiled it but it doesn't work correctly with Arabic characters. They appear like questions marks "?".

I don't know where is the problem.

In 2006 I have Vista on my machine and now also I am working with the same operating system.

Any suggestions on how to fix the problem?

Question by:Masaria
    LVL 86

    Expert Comment

    Check your project settings and make sure that "Use Character Set: UNICODE" is selected and then rebuild your project. ALT+F7 will take you to the project settinggs, and IIRC you'll find that under "General". Sorry for not being more precise, but it's a while ago since I last used VC6.

    Accepted Solution

    I checked what you said, there is no such "Use Character Set: UNICODE".

    There is a folder called "Unicode_Release" in the project files and I think the author used it as intermediate files :


    Author Comment

    Here is the link to Neatpad:

    Neatpad - Catch22
    LVL 32

    Expert Comment

    did you use successfully Arabic characters in 2006? or is it the first time you try to use them?

    as far as I remember, the text editor of vc6 is not capable to print unicode characters, neither you can "see" them in the debugger.

    however, win32 programs should work correctly with unicode if your configuration has defined the _UNICODE and UNICODE macros in the c++ preprocessor settings. look at the c++ tab - preprocessor whether they were defined.

    if you want to use literals in Unicode, you can't edit them with the vc6 text editor. also I am not sure whether you could put such texts into resource files. you may consider to download visual studio 2013 express for editing texts and you could read them in vc6 with mfc or stl (std::wifstream, std::wofstream,  and std::wstring). when the _UNICODE macro was defined the so-called T-switch in your sources was switched to use wide characters. that means all types and macros like LPTSTR, TCHAR,  _T(), would turn to LPWSTR, wchar_t,  L"..." and mfc class CString also would be based on wide strings.

    LVL 32

    Expert Comment

    note, folders or configuration names with unicode in the name, is nothing what you can rely on. those names are arbitrary and it can be that the author tried to use Unicode but witched back to multi-byte character set later. you need to check whether the unicode settings of the project configurations for debug and release still were correct. also check whether the code uses the T-switch correctly or whether they explicitly used the wide character types what could be a valid alternative to using the T types.

    LVL 12

    Expert Comment

    check whether you have the fonts installed on the system you are running....

    Author Closing Comment

    resolving abounded old question.

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    MaxSpan challenge 9 51
    data scientists and AI 17 54
    wordmultiple challenge 12 64
    Eclipse IDE - Cannot copy/paste from console output 8 15
    This article will show, step by step, how to integrate R code into a R Sweave document
    When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now