I make a point of researching local laws that might affect me before traveling to another country. Learning such information can help avoid awkward or dangerous encounters with local police.
That having been said, I also stand by the advice I give every traveler who doesn’t speak the language or know the customs when visiting or living in a foreign country: if you’re ever caught up in a violent situation that might require the police to be involved, RUN. It doesn’t matter if you’re in France and someone decides to randomly punch you in the face, or you’re in South Korea and an old racist starts yelling at you — RUN. This isn’t a matter of right or wrong, but rather a simple risk analysis; if you can’t speak the language and don’t know how the legal system works, you won’t be able to defend yourself when it matters most, i.e. when the accusations are being lobbed. The chance of you just getting processed and forgotten isn’t worth attempting to find justice in a foreign country.
There are a few reasons why I espouse this approach to Japan in particular.