Informatika, Unik di Jepang
Tinggalkan sebuah Komentar

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.

Jpn Space 1.PNG

Give up?

Well, let me give you clearer picture with a clue.

Jpn Space 2.PNG

So is this any problem?

Yeah. It will give compile error.

Jpn Space Error.PNG

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.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.