News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

strange char in edit control

Started by TouEnMasm, April 28, 2021, 06:22:41 PM

Previous topic - Next topic

TouEnMasm

Hello,
When i read a text like this one in the notepad,i got his:
Quote
the instruction's default operation
When I read it in an edit control,I get this
Quote
the instruction’s default operation
It is the '   who is badly interpreted,Naiional language used (Neutral instead of french) seem to be responsible of the trouble.
How to solve that any where ?


Fa is a musical note to play with CL

hutch--

Yves,

See if it changes with the font you use.

jj2007

Quote from: TouEnMasm on April 28, 2021, 06:22:41 PMthe instruction’s default

Your text file is Utf-8 encoded (as is most of the stuff you see on the web). Convert it to Utf-16 using MultiByteToWideChar, and load the result into the edit control with SetWindowTextW.

With wPrint wRec$("the instruction’s default"), I see the instruction's default.

TouEnMasm


I have tested another font,no change.
Is it possible to made the edit control use another code (code page ..)?
Fa is a musical note to play with CL

jj2007

The font isn't the culprit. Your OS knows how to display an apostrophe.

Did you convert the text to Utf-16 using MultiByteToWideChar?
Did you load the Utf-16 result into the edit control with SetWindowTextW?

Btw posting your code is always a good option :cool:

daydreamer

Quote from: TouEnMasm on April 29, 2021, 12:33:11 AM

I have tested another font,no change.
Is it possible to made the edit control use another code (code page ..)?
is it a local language thing,so change windows language to english solve it ?
or maybe some setting in resource files changes language?
I have some local ÅÄÖ myself
unicode edit control might solve it?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

TouEnMasm


After many tests,with uni ansi codepage .. find the best soluce ......it's an old new secret......
NOTEPAD
The notepad had a menu where the file can be save with various Encoding as ANSI,UTF8,UTF16-LE ....
After that , i had just to change the one char who was not very pretty.
Thanks for help.
Fa is a musical note to play with CL