Problem with string encoding

8 posts, 0 answers
  1. Valentin
    Valentin avatar
    73 posts
    Member since:
    Mar 2016

    Posted 13 Oct Link to this post

    Hello,

     

    I'm using a RadGridView. In columns, I set data items with simple string values, but the encoding doesn't working : I'm french, and I'm using accents :)

     

    For example :

    - I want that the grid displays "DO Cité"  ---> You can see the result in attached file.

    ___

    So, I didn't find how I can apply encoding for my RadGridView (or my Window).

     

    Thank you for your help !

     

    Valentin.

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 17 Oct Link to this post

    Hello Valentin,

    Could you please specify which theme you've used in your application? I'm attaching a sample project where I've used the Office2016 theme and the string is displayed as expected? I've also tested the same string in the Expression_Dark, Office_Black and Windows8 theme and found no issues.

    Please also make sure that you've not used any custom fonts and if so, that they support the accent characters you wish to display.

    Do let me know how this goes.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Valentin
    Valentin avatar
    73 posts
    Member since:
    Mar 2016

    Posted 18 Oct in reply to Dilyan Traykov Link to this post

    Hello Dilyan, thanks for your answer.

     

    I'm using a custom Windows8Theme, like this :

    this.PersonnaliserTheme();
    StyleManager.ApplicationTheme = new Windows8Theme();

    And :

    public void PersonnaliserTheme()
            {
                // Bandeau (par exemple)
                //Windows8Palette.Palette.MainColor = (Color)ColorConverter.ConvertFromString("#FF35496A");
     
                // Couleur d'écriture des items (liste cbx etc)
                //Windows8Palette.Palette.MarkerColor = (Color)ColorConverter.ConvertFromString("#AABB12");
     
                // Pas trouvé
                //Windows8Palette.Palette.ValidationColor = (Color)ColorConverter.ConvertFromString("#BB4579");
     
                // Sur les boutons 'supprimer' 'enregister' etc
                //Windows8Palette.Palette.StrongColor = (Color)ColorConverter.ConvertFromString("#7872AA");
     
                // Couleur des contours
                //Windows8Palette.Palette.BasicColor = (Color)ColorConverter.ConvertFromString("#BB4579");
     
                // Header des fenêtres
                Windows8Palette.Palette.AccentColor = (System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#424949");
            }

     

    I'm using this because I wanted to change the Window8Theme main color (because it is very light blue), and I founded that it is this property which cans do it.

    Do you think the problem come from this property ?

     

     

    Thank you.

  5. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 18 Oct Link to this post

    Hello Valentin,

    I'm attaching a modified version of my project where I'm using the Windows8 theme and the aforementioned string is still being displayed as expected.

    Could you please confirm that you're not using any styles targeting the FontFamily property which may be inherited by the RadGridView control and causing this result at your end?

    On a side note, you can have a look at the following article which lists the advantages of using implicit styles as opposed to using the StyleManager.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Valentin
    Valentin avatar
    73 posts
    Member since:
    Mar 2016

    Posted 18 Oct in reply to Dilyan Traykov Link to this post

    Hello Dilyan,

     

    I can't opening your project because I'm using VS 2010 and it's incompatible.

    In my .Xaml, I'm using neither styles targeting the FontFamily nor apply a 'Font' properties (like color, size, etc...). I'm using the default values.

     

    I tried your code :

    <Style x:Key="cellStyle" TargetType="telerik:GridViewCell">
                <Setter Property="HorizontalContentAlignment" Value="Center"/>
                <Setter Property="FontFamily" Value="Consolas" />
    </Style>
    // I added your FontFamily setter.

     

    -> The font is applied but the black special character with '?' is always presents.

     

    I noticied that when I edited cell, the accent is applied (attached file).

    Resume :

    => When data is loaded, accent isn't here.

    => When data is added by editing, accent is presents.

     

    Thank you for your answer.

  7. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 20 Oct Link to this post

    Hello Valentin,

    Unfortunately, I'm still unable to reproduce the issue you're describing as accents are displayed correctly in both edited and non-edited cells at my end. Here's a link to a video demonstrating the result I observe.

    Could you please try building a new project from scratch based on the code of the project I sent you and let me know if you still observe this end result? If that is the case, could you please specify which version of the controls you're using in your project? Bear in mind that I've tested this with the latest release as well as the 2014.1.224 binaries and get the same result in both cases.

    I will be awaiting your reply.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
  8. Valentin
    Valentin avatar
    73 posts
    Member since:
    Mar 2016

    Posted 20 Oct in reply to Dilyan Traykov Link to this post

    Hello Dilyan,

     

    I can't do working find your project on my VS2010 (differents errors, maybe the references...) but I see that in your App.xaml, you used <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8 ...... and in my App.xaml, I'm using <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013 ......

    With this reference, I can use the Windows8Theme Class, but do you think that the error can come from this differences ?

     

    I'm using the 2015.3.930.40 version.

     

    Thank you very much.

     

  9. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 20 Oct Link to this post

    Hello Valentin,

    I do not believe this difference can be causing this issue, but you should best stick to using the VisualStudio2013Palette.

    VisualStudio2013Palette.Palette.AccentColor = (System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#424949");

    Unfortunately, I'm unable to guide you any further using just the provided information. Would it be possible for you to upload a sample project to some cloud provider and provide me with a download link so that I may further assist you?

    Thank you in advance for your cooperation.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Back to Top
UI for WPF is Visual Studio 2017 Ready