Programming and Japanese

When I was programming for some Japanese text processing, I encountered a problem which is caused by treating a Japanese text in the program.

English texts are sometimes called single byte strings since each character is represented by a single byte. On the other hand, Japanese texts are sometimes called multi-byte string since each character is represented from two to four bytes. It is because the number of Japanese character is much larger than English characters. This complicated representation of Japanese texts makes treating Japanese texts in a program much difficult.

My program had a problem like above, but I didn't know why and where is the problem. I spent a couple of hours to solve the problem. I had not solved it completely yet. I will continue to tackle the problem tomorrow.