Hari: 18 April 2016

A Space That Creates Hard-to-track Bug

Programming with Japanese keyboard is quite dangerous. To understand what I am talking about, please see the following two characters: “ ” versus “ ”. See the difference? Now, imagine it was typed in Notepad++, in programming context. To illustrate this, I make this easy example. Please guess which one is which. Give up? Well, let me give you clearer picture with a clue. So is this any problem? Yeah. It will give compile error. Now that I know the problem, it is easy to track. We can look for strange looking characters in the error log. However, the first time I encountered it, it took me hours. Imagine if this ominous space character is accidentally typed among sea of Japanese text (between String or Japanese comment for example). May god always protect us. Now, please mind your space.