Earlier quoted context omitted.
Probably lots of places, but certainly the USA, for instance.
Can you give an example of a piece of text that would be illegal to write (not transmit/communicate, just write) in the US?
UPDATE: No, that was a joke. I was referring to imagery, which fictional or not can definitely be illegal in the USA even if you draw it yourself in your private journal.
I'm not sure if you can be prosecuted in the USA for anything you write down yourself and don't somehow disseminate. (Although "doing it with computer" might also change the equation... US laws get pretty weird.)