News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Language problem

Started by realcr, December 27, 2004, 07:49:51 PM

Previous topic - Next topic

realcr

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.

realcr

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.

pbrennick

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

pbrennick

#3
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

pbrennick

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

realcr

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.

pbrennick

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

realcr

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.

pbrennick

realcr,
I am glad I could help.  Let us know how you make out.
Paul

Vortex

I am not sure but the problem might be solved by using UNICODE strings.

pbrennick

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

Vortex

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

pbrennick

Vortex,
I wont continue to go off topic, but it is actually thanks to you and your nice Autotyping example. :U
Paul