A 2,7-carbazole-based dicationic salt for fluorescence detection of nucleic acids and two-photon fluorescence imaging of RNA in nucleoli and cytoplasm.