For this blog post, I wanted to have a nice unicode converter on my computer so that I can use the unicode characters in the code examples. A few days ago, I decided to give this a go. It took me a bit to figure out how to use it, but once I got the hang of it, everything was pretty simple.
I’m not going to lie, I was a little confused at first, but once I realized that there was a lot of repetition, the code was easy to follow. I think I’m really pleased with this one and am going to use it a lot more.
I love the new unicode converter ontools. It’s a good way to convert your code from a script-based language to a unicode format, which is awesome. There’s no need to worry about converting the characters like you do in a text editor. All you have to do is just click the convert button and it will convert the string to the desired format.
Its great to be able to read and write unicode characters in your scripts, but in the end the problem here is just how to write it that way. I would think that a simple method of string manipulation would be to use the UTF-8 encoding method in your.NET assembly.
That’s the method I use to encode strings in my scripts and then decode them in my C# code. However, the problem is that the string isn’t actually UTF-8 encoded. It’s just a bunch of bytes in the wrong order. It makes it impossible to read the string in a text editor, and it doesn’t let me write it to a file.
You could always convert it to UTF-16 first, but then again, that would mean writing a string to a file with all those extra spaces and newlines and such, and there is no way I could do that in a reasonable time.
I have to dig up the exact command I used to convert my strings.
The problem was that unicode wasn’t in the default text editor, and so I had to find a way to convert my strings to utf-8. There are several online tools which make this relatively easy.
The first was the awesome unicode-converter. It was created by a guy named David Carlisle, and he has the best website about it. The second was The latter just requires you to install a text editor. I tried both, but I couldn’t get either to work. The unicode-converter I found was specifically designed for windows and did NOT work on my system.
The unicode-converter tool is a Windows tool, and I use it with a Mac. It works great with my Mac, but I am not sure if there is a way to use it with a windows text editor. I tried to install it, and I couldnt even find a download link. I know theres a mac version, but I dont see a download link.