2

I have a sqlite database that I access from my WP7 app using the coolstorage ORM. The charset used for the text fields of the db (which are in German) is UTF-8. The database is quite simple and only has one table. My model in the app looks something like this:

[MapTo("recipes")]
public class Recipe : CSObject<Recipe,int>
{
    [DefaultSort]
    public int Id
    {
        get { return (int)GetField("Id");  }
    }

    public string Category
    {
        get { return (string)GetField("Category"); }
        set { SetField("Category", value); }
    }

    // More text fields

And then I fetch a row from the db by doing the following:

rec = Recipe.ReadFirst("Category=@Category and Name=@Name",
                                 "@Category", category,
                                 "@Name", recipe);

The problem is that all the special German characters show up like this: �, even though they're properly stored on the db. All the normal ASCII characters show up just fine.

How can I solve this? Thanks in advance.

tomurillo
  • 47
  • 1
  • 5
  • What do you mean by "show up"? How are you displaying the text? In HTML? – Philippe Leybaert Jan 26 '12 at 12:55
  • @PhilippeLeybaert Hey, thanks for the reply. I am simply databinding my fetched strings into textblocks on my View. I am using MVVM light if that's of any help. So in my View I have something like this: – tomurillo Feb 02 '12 at 10:21

1 Answers1

0

You might want to look at this http://msdn.microsoft.com/en-us/library/7b93s42f.aspx

DaMaGeX
  • 693
  • 7
  • 18