Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 288795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:50:57+00:00 2026-05-12T05:50:57+00:00

In some RightToLeft languages (Like Arabic, Persian, Urdu, etc) each letter can have different

  • 0

In some RightToLeft languages (Like Arabic, Persian, Urdu, etc) each letter can have different shapes. There is isolated form, initial form, and middle form (you can just find it on the Character Map of the windows for any unicode font).

Imagine you need the exact characters that user has been entered on a text box, by default, when you converting the String to CharArray, it will convert each character to Isolated form.

(because when user entering the characters by keyboard, it is in the isolated form and when it is displaying on the screen, it will be converted to proper format; this is just a guess. because if you make the string by using exact character codes, it will generate the proper array).

My question is, how we can get that form of the string, the form that has been displayed in the textbox.

If there is no way in .NET then this means i need to make my own class to convert this T_T

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:50:57+00:00Added an answer on May 12, 2026 at 5:50 am

    Windows uses Uniscribe to perform contextual shaping for complex scripts (which can apply to l-to-r as well as r-to-l languages). The displayed text in a text box is based on the glyph info after the characters have been fed into Uniscribe. Although the Unicode standard defines code points for each of isolated, initial, medial, and final forms of a chracter, not all fonts necessarily support them yet they may have pre-shaped glyphs or use a combination of glyphs—Uniscribe uses a shaping engine from the Windows language pack to determine which glyph(s) to use, based on the font’s cmap. Here are some relevant links:

    • More Uniscribe Mysteries (explains difference between glyphs and characters)
    • Microsoft Bhasha, Glyph Processing: Uniscribe
    • MSDN: Complex Scripts Awareness
    • Buried in the bowels of Mozilla code is code that handles complex script rendering using Uniscribe. There’s also additional code that scans the list of fonts in the system and reads the cmap tables of each font. (From the comments at http://www.siao2.com/2005/12/06/500485.aspx).
    • Sorting it all Out: Did he say shaping? It’s not in the script!

    The TextRenderer.DrawText() method uses Uniscribe via the Win32 DrawTextExW() function, using the following P/Invoke:

    [DllImport("user32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
    public static extern int DrawTextExW( HandleRef hDC
                                         ,string lpszString
                                         ,int nCount
                                         ,ref RECT lpRect
                                         ,int nFormat
                                         ,[In, Out] DRAWTEXTPARAMS lpDTParams);
    
    [StructLayout(LayoutKind.Sequential)]
    public struct RECT
     {
       public int left;
       public int top;
       public int right;
       public int bottom;
     }
    
    [StructLayout(LayoutKind.Sequential)]
    public class DRAWTEXTPARAMS
    {
      public int iTabLength;
      public int iLeftMargin;
      public int iRightMargin;
      public int uiLengthDrawn;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When PictureBox have parent ListView and ListView RightToLeft set to true/yes I received some
Some setup background first: I have a cronjob which runs a PHP file called
Some folks using our software have gone ahead and done a database server move
Some of the users of our Ruby on Rails app have complained that page
Some UserControl uses converters, which usually look like this: <UserControl.Resources> <Converters:CurrentDataConverter x:Key=CurrentDataConverter/> </UserControl.Resources> I
Some cross-platform packages like Ruby or Qt prefer %HOMEDRIVE% as the default installation path,
Some background: We have some entity classes need to be serialized, so we implement
I recently received an Arabic translation for my app, but would like to do
Some friends and I have had an idea for a website and have started
Some of the responses to a question I asked today earlier today have caused

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.