Saturday, March 5, 2016

Visual Studio 2015 and Arabic Charecters Support

Alot of times I need to go through my old projects and try to revive them by giving them a framework facelift along with a little bit of gadgets make up. I had a problem with some of those "wreckage" as the have been written for an Arabic content website. so whenever I load them into the coding environment I ended up having a weird looking characters.

Damn you unicode!
Now, I know it has to do with unicode and stuff. So, logically, what I started to do is to save them into Arabic Windows - Codepage 1256 but I made the matter worse as it appeared to me now that it will not be recoverable later and will stick with those gibberish characters.

What you have to do if you face this problem.

First, you right-click on the file and select "Open With"

From that dialogue box you select Web Forms Editor with Encoding and then you can choose the Unicode for the page to open with.

In my situation I have selected the Arabic (Windows) - Codepage 1256 to open the page and, voila, it opened with normal looking lovely arabic characters.

But that is not it!

I you saved your file now and reopen it you will go back to square 0 and see that it is still having corrupted characters.

What should I do now?

After that you have to save it using Files > Advanced Save Options and now Unicode (UTF-8 with signature) - Codepage 65001 and then Ctrl + S (to save it)

Opening it now make feel touching the rainbow in the morning breeze!!

No comments:

Post a Comment