Re: How to read and Display Non English Characters
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Mon, 27 Jul 2009 14:42:41 -0400
See below...
On Mon, 27 Jul 2009 08:57:06 -0700 (PDT), singurd <singurd@xxxxxxxxx> wrote:
****
Hi Joe
i am using Win XP, with the good ol' visual studio 6.0.
I have installed the Asian language support. So i am able to display
the non english characters at a notepad text file. So i think there
wont be any issue of font selection.
As long as you have one of these fonts selected in the control you want to use, you should
be fine. Note, however, that normally these fonts are not selected by default.
****
I use FILE* operation to read the string, but the content of the****
variable is gibberish
FILE* is probably a Bad Idea. There are some articles (either Tom Serface or Giovanni
Dicanio or both) on reading Unicode strings.
****
****
as long as i install Win XP Asian language support at client PC they
too should be able to display the text. But how to handle such string
in my program ?
Convert to Unicode. Now. Don't wait. Trying to do this in other than Unicode is going
to cause continuing crises, disasters, and confusion.
****
I am trying to read and display the content of the text file.****
basicly that text file represents "localized language display"...
Converting to Unicode would be my last option, because this program
links with non many non unicode DLLs ..
That is truly unfortunate. Working with MBCS is a complete nightmare. The general advice
from those who have tried is that it loses all the time, in every way, and can never
actually be made right.
Using VS6 is unfortunate because it doesn't have the CStringA/CStringW types.
I can't give advice on how to do this in an 8-bit character app; it is not something I
would ever try to do. If I had to use 8-bit DLLs, I'd probably convert the strings at the
interface as necessary and do everything else in Unicode. The problem is that a DLL that
is not prepared for MBCS is going to probably do fairly freaky things with the strings,
most of which will be unexpected.
joe
****
RegardsJoseph M. Newcomer [MVP]
On Jul 27, 9:06 pm, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:
First, move on to Unicode. There's not a lot you can do if you aren't using Unicode, and
the solutions (such as MBCS) are clumsy and error-prone.
You did not mention what version of the OS or what version of VS you are using.
You will need appropriate fonts that display the characters. WIthout a font that has the
characters, you will get no meaningful output. Font selection is your problem. I use
Arial Unicode MS for this purpose. As far as I know, it is either already installed on
your system or you can download it from the MS Web site (that's how I got mine for XP).
For input, you need to look at "Input Method Editors" or "IME". But I've never done this,
and others who have will be able to give you better tips on how to use these capabilities.
Also look at MUI (Mulilanguage User Interface), another area I have not played in. MUI is
available for Vista and beyond. Look athttp://msdn.microsoft.com/en-us/goglobal/bb978454.aspx?ppud=4
joe
On Mon, 27 Jul 2009 03:16:23 -0700 (PDT), singurd <sing...@xxxxxxxxx> wrote:
Good Day Group
I have a text file that contains some chinese characters,
But i am unable to read and display them correctly..
So how should i convert them ?
btw I am compiling WIN32 Release/Debug version not unicode..
Regards
Joseph M. Newcomer [MVP]
email: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: How to read and Display Non English Characters
- From: Brian Muth
- Re: How to read and Display Non English Characters
- References:
- How to read and Display Non English Characters
- From: singurd
- Re: How to read and Display Non English Characters
- From: Joseph M . Newcomer
- Re: How to read and Display Non English Characters
- From: singurd
- How to read and Display Non English Characters
- Prev by Date: Re: How to optimize animating of multiple small areas of a view?
- Next by Date: Re: How to read and Display Non English Characters
- Previous by thread: Re: How to read and Display Non English Characters
- Next by thread: Re: How to read and Display Non English Characters
- Index(es):
Relevant Pages
|
Loading