0

I am building a WPF application, and displaying odia/oriya language in labels and textbox. Some Unicode words are not not rendering properly in .NET Framework 3.5 +

Words are rendering correctly in .NET Framework 3.5, but as version is increased, words are splitting. Word is: ବିଷ୍ଣୁ

Word is rendered correctly (.NET Framework 3.5):

Rendering Correctly

Word splits (.NET Framework > 3.5):

Word Splitted

Why different behaviour? Same application, different framework.

Environment: Win7SP1, VS2013, C#WPF

UPDATE: Adding WPF code

<Window x:Class="DeleteThisWPF.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <TextBox x:Name="txtBox" Text="ବିଷ୍ଣୁ" HorizontalAlignment="Left" Height="151" 
                 FontSize="72" Margin="31,10,0,0" TextWrapping="Wrap"
                 VerticalAlignment="Top" Width="264"/>
        <Label Content="ବିଷ୍ଣୁ" HorizontalAlignment="Left" Margin="197,197,0,0"
               FontSize="60" VerticalAlignment="Top" Width="310" />
    </Grid>
</Window>
G J
  • 477
  • 9
  • 23
  • I don't have an answer, but in case it helps here's some findings: Using [this](http://stackoverflow.com/a/13894030/5095502) we can see the unicode characters are: U+0B2C, U+0B3F, U+0B37, U+0B4D, U+0B23, U+0B41. Every second character listed here is a "combining mark", which when we combine the pairs end up with: `ବି` `ଷ୍` `ଣୁ` -- what I don't understand is how it's decided that `ଣୁ` as a whole combines with `ଷ୍` but does not combine with `ବି`. `ଣୁ` is not itself a "combining character" as far as I can tell, but typing `ଷ୍` + `ଣୁ` = `ଷ୍ଣୁ` in every text editor I've tried. – Quantic Nov 09 '16 at 18:50
  • I just made a WPF application that only has a `TextBox` and I cannot duplicate your problem on framework version 3, 3.5, 4.5, or 4.5.2. Can you post the code you are using? And how are you entering the characters into the textbox? – Quantic Nov 09 '16 at 19:21
  • I simply added a textbox and a label nothing else. What is framework 3 @Quantic? never heard of it :P – G J Nov 09 '16 at 21:44
  • My browser is rendering it in 3 grapheme clusters, the way your >3.5 preview has it. Are you certain it is a .NET issue and not a font one? – Cory Nelson Nov 09 '16 at 22:08
  • I copy and pasted your code and it still comes out fine for me on pre and post .NET Framework 3.5 versions. When you say, "Words are rendering correctly in .NET Framework 3.5, but as version is increased ...", you mean you are just clicking the [Target framework dropdown](https://msdn.microsoft.com/en-us/library/bb398202.aspx) and rebuilding it, right? – Quantic Nov 09 '16 at 23:11
  • Yea, I am doing nothing but changing framework, rebuild it and then ziber-zaber – G J Nov 10 '16 at 09:18

0 Answers0