The key signature says either F major or D minor. Sort of vague. Were there some C♯s in the piece, it would point more towards D minor - and I suspect the C♯ diminished chord could be used in evidence.
As far as changing key - obviously one is bound by the new key signature. If it went into E major, there'd be sharps, E♭ major, flats, but as far as diminished chords are concerned, we tend to take the lowest note as the root. They are symmetrical, so could have four (or more) names. I've seen the same diminished chord with different names in different places in the same piece.
Since in the original, that diminished leads to Dm, C♯o seems like a better option. So, transcribing it into, say, G major, it would become D♯o, into C major, it's G♯o - taking its name from the fact it's leading to the relative minor. But - if there was, say, in the last example, a bass note of D, it could be Do.
EDIT: the title needs addressing. It must mean accidentals, because the sharps or flats in the new key are a given. That can't be any other than one key signature. So, with that in mind, generally, in flat keys, additional accidentals are kept to flats, and vice versa. The reader already has his 'flat hat' on, so continuing with that mindset is good. There are occasions where technically an accidental neeeds to be disobeying that 'rule'. For example, in key F, if there's a C+, using C E and G♯, that accidental won't be correct written as A♭, even though the key sig. has a flat already. It also helps to explain the function of certain harmonies better that way.