If you have not tried the Windows Phone App Studio, you should give it a try. It is a simple online tool that allows anyone to build a Windows Phone app with a few clicks of a button. Read more “Windows Phone App Studio – Part 2 – RSS Reader Fix”
Welcome to the first part of the Windows App Studio Tutorial. In this article we will be looking at what the online tool of Windows Phone App Studio provides us. We will also see how anyone can get started (and I mean anyone, more on this later) to create a Windows Phone app in a few simple steps. Read more “Windows Phone App Studio – Part 1 – Getting Started”
I am working on a new app that utilizes local JSON as well as JSON and XML results from a RESTful service. I enjoy the local JSON with Visual Studio 2013 and Windows Store app since I can bind my JSON data to my XAML to view it at design time. Saves a lot of time when it comes to spacing and determining what your UI looks like.
However, when I tried to run my app I get one of those lovely error messages.
WinRT information: No mapping for the Unicode character exists in the target multi-byte code page.
WTF! Something is obviously wrong with my JSON. So I perform the following troubleshooting routines.
- I take the JSON and go to a online validator to ensure that is it valid. (I use JSONLint.com. It does a fine job.) It should be valid because the XAML designer shows my data, but just to be safe.
- Perform a Copy n Paste into my favorite text editor and copy back out.
- Skim through my JSON looking for ‘ or any other character that should not be in there.
All of which proves to be unsuccessful. So what do I do.
Well, apparently in Visual Studio you have the ability to save files in different formats. If you open the file in Visual Studio, then go to the File Menu and choose Advanced Save Options you can choose different file encodings. The encoding that came up for my JSON file was Western European (not sure why we are still called Western European but that is a different post).
I changed the encoding from Western European to Unicode UTF-8. Magically it worked!
Hopefully this will help anyone who runs into a issue similar to the one I had with Unicode.