Glossary
Japanese line breaking is based on the kinsoku ruleyou can break lines between any two characters, with several exceptions. The first exception is that a line of text cannot end with any leading characters, which are listed below. (Characters are shown with their hexadecimal code points for Shift-JIS.)
24 | A2 | 816D | 8177 | ||||
28 | 8165 | 816F | 8179 | ||||
5B | 8167 | 8171 | 818F | ||||
5C | 8169 | 8173 | 8190 | ||||
7B | 816B | 8175 | 8192 |
The second exception is that a line of text cannot begin with any following characters. Following characters are listed below.
21 | B0 | 8168 | 82A7 | ||||
25 | DE | 816A | 82C1 | ||||
29 | DF | 816C | 82E1 | ||||
2C | 8141 | 816E | 82E3 | ||||
2E | 8142 | 8170 | 82E5 | ||||
3F | 8143 | 8172 | 82EC | ||||
5D | 8144 | 8174 | 8340 | ||||
7D | 8145 | 8176 | 8342 | ||||
A1 | 8146 | 8178 | 8344 | ||||
A3 | 8147 | 817A | 8346 | ||||
A4 | 8148 | 818B | 8348 | ||||
A5 | 8149 | 818C | 8362 | ||||
A7 | 814A | 818D | 8383 | ||||
A8 | 814B | 818E | 8385 | ||||
A9 | 8152 | 8191 | 8387 | ||||
AA | 8153 | 8193 | 838E | ||||
AB | 8154 | 81F1 | 8395 | ||||
AC | 8155 | 829F | 8396 | ||||
AD | 8158 | 82A1 | |||||
AE | 815B | 82A3 | |||||
AF | 8166 | 82A5 |
The third exception is that certain overflow characters are allowed to extend past the right or bottom margin. Those characters that can are listed below.
2C | 8141 | ||
2E | 8142 | ||
A1 | 8143 | ||
A4 | 8144 |
You must decide how to implement special cases. For example, you might choose to break lines only between complete words instead of between two individual characters. Also, you might want to follow standard English or European line-breaking rules for any text that the user enters using Latin characters.