The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: realcr on December 27, 2004, 07:49:51 PM

Title: Language problem
Post by: realcr on December 27, 2004, 07:49:51 PM
I copied the text(written in the hebrew language) I wrote inside a textbox to a buffer and then sent it through WM_CHAR message to notepad ,but it was recieved in notepad as Giberish.
However  , when I write English text everything works fine.
How can I fix the problem?

bar.
Title: Re: Language problem
Post by: realcr on December 27, 2004, 07:56:59 PM
BTW I found that the Hebrew charcters are ordered from 128 to 154 on the ASCII table.
However , when an application recieve WM_CHAR notification for example on the first Hebrew character , it gives 224.
I tried doing "sub ch,96" for every character however it still gives Giberish. (maybe a liitle different Giberish...)

bar.
Title: Re: Language problem
Post by: pbrennick on December 27, 2004, 09:14:44 PM
realcr
Although, as you say, the Hebrew characters are from 128 to 154, you need to realize that this only applies to a specific character set.  You will need to select that character set for use, in Control Panel, so that notepad.exe will use it.

Paul
Title: Re: Language problem
Post by: pbrennick on December 27, 2004, 09:27:21 PM
realcr,
In XP, double click 'Regional and language options, then click the advanced tab and then place a check in the box next to Hebrew in the codepage translation table.  At the top of the box it says this will make that language available.  What you are selecting is the codepage for Hebrew.  I am not sure if this is a total solution but this is where the solution must be found.
Also, look in languages, details for another checkbox that should enable your changes to apply to Notepad.exe
Paul
Title: Re: Language problem
Post by: pbrennick on December 27, 2004, 10:07:23 PM
realcr
While playing around with the Windows Hebrew Character Map found in Programs\Accessories\System Tools\Character Map, I discovered that Hebrew characters that I selected and copied into the clipboard did not display properly in NotePad but did display properly in WordPad.  If you can't get it to work in NotePad I would suggest you switch to WordPad.
Paul
Title: Re: Language problem
Post by: realcr on December 28, 2004, 12:20:56 PM
tnx pbrennick , I will check it out.
I don't think there is a problem in the hebrew characters defenitions since my default language is hebrew on this computer.

bar.
Title: Re: Language problem
Post by: pbrennick on December 28, 2004, 12:57:04 PM
realcr,
That being the case, Hebrew being the default language on your PC, I suspect that NotePad, which is a very basic app, will never work for you.  Try WordPad, it works for me.
Paul
Title: Re: Language problem
Post by: realcr on December 28, 2004, 10:34:06 PM
Hey , I believe you were right. It worked with wordpad (most of the times). I hope I am going to find out how it works...
Great thanks for your help,

bar.
Title: Re: Language problem
Post by: pbrennick on December 28, 2004, 10:59:35 PM
realcr,
I am glad I could help.  Let us know how you make out.
Paul
Title: Re: Language problem
Post by: Vortex on December 29, 2004, 10:49:53 AM
I am not sure but the problem might be solved by using UNICODE strings.
Title: Re: Language problem
Post by: pbrennick on December 29, 2004, 03:39:45 PM
Vortex,
I am sure he already is, it is the only way you can use a language such as hebrew because it is a character set filled with 2 digit assignments.  NotePad.exe can't support that and that is why I advised WordPad because it uses the RichEdit control which supports unicode.  My editor would also have worked for him but it was just too cheeky a suggestion so I did not make it.
Paul

Off topic:  I am still trying to find out about the CRLF problem using Autotyping in a richedit control.  When I find out I will share it with you.
Paul
Title: Re: Language problem
Post by: Vortex on December 29, 2004, 07:48:30 PM
QuoteOff topic:  I am still trying to find out about the CRLF problem using Autotyping in a richedit control.  When I find out I will share it with you.

Many thanks Paul :U
Title: Re: Language problem
Post by: pbrennick on December 29, 2004, 09:39:49 PM
Vortex,
I wont continue to go off topic, but it is actually thanks to you and your nice Autotyping example. :U
Paul