HighTechTalks DotNet Forums  

Windows 2000 Pro - Arabic Text Issue when using Microsoft CDC class.

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss Windows 2000 Pro - Arabic Text Issue when using Microsoft CDC class. in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Windows 2000 Pro - Arabic Text Issue when using Microsoft CDC class. - 01-31-2005 , 12:21 PM






Hi,
I would greatly appreciate any help with the following problem.
I am using Windows 2000 Pro and want to display Arabic text in an MDI
window.
I have set all the regional options to be Arabic(Saudi Arabia)
including my default system locale.
I can enter Arabic text in an edit box on a property sheet, hit apply
and the correct Arabic text is set as the title of the MDI window (so
the Microsoft Controls are working as expected).
I then enter Arabic Text in an edit box on a property sheet, hit apply
and the correct Arabic text is not displayed in the window. The text
displayed appears to be extended Latin1 characters (as if for an
ENGLISH (United States) locale).

The code that tries to perform the writing is:-
pDC->DrawText(csNodeName,-1,rectText,DT_WORDBREAK || DT_CENTER);

I added code to get the thread locale just before making this call and
it shows the thread locale to be ARABIC (Saudi Arabia).

Any Suggestions\Ideas?

Thank you in advance for any help

John Nugent

Reply With Quote
  #2  
Old   
Sylvain Lafontaine
 
Posts: n/a

Default Re: Windows 2000 Pro - Arabic Text Issue when using Microsoft CDC class. - 01-31-2005 , 06:09 PM






Mixing different locales will always give you trouble; you should use
Unicode instead but the the support for Unicode under Windows 2000 is
limited; you must go to WinXP. (Even with WinXP, you will have problem with
locales). Maybe you will find some usefull information at the following
links:

http://www.microsoft.com/middleeast/...rabicsupp.aspx

and for SQL-Server:
http://msdn.microsoft.com/library/de...taencoding.asp

S. L.

"Duboin" <John.Nugent (AT) Singularity (DOT) co.uk> wrote

Quote:
Hi,
I would greatly appreciate any help with the following problem.
I am using Windows 2000 Pro and want to display Arabic text in an MDI
window.
I have set all the regional options to be Arabic(Saudi Arabia)
including my default system locale.
I can enter Arabic text in an edit box on a property sheet, hit apply
and the correct Arabic text is set as the title of the MDI window (so
the Microsoft Controls are working as expected).
I then enter Arabic Text in an edit box on a property sheet, hit apply
and the correct Arabic text is not displayed in the window. The text
displayed appears to be extended Latin1 characters (as if for an
ENGLISH (United States) locale).

The code that tries to perform the writing is:-
pDC->DrawText(csNodeName,-1,rectText,DT_WORDBREAK || DT_CENTER);

I added code to get the thread locale just before making this call and
it shows the thread locale to be ARABIC (Saudi Arabia).

Any Suggestions\Ideas?

Thank you in advance for any help

John Nugent



Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default RE: Windows 2000 Pro - Arabic Text Issue when using Microsoft CDC class. - 02-10-2005 , 07:32 PM



John,
this should work as underlying this calls the Windows DrawText function:
http://www.microsoft.com/globaldev/g..._cscripts.mspx

You should make sure you selected a font for the dialog that can display
Arabic and also that you set the option DT_RTLREADING for the DrawText
call.

(Or it could be that you earlier did a conversion from Unicode to multibyte
encoding by using the default C locale)

Hope this helps
Achim Ruopp

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.