Q:

How to choose between Cdim and C#dim?

I have noticed that there is a common chord progression that exists in a few variants: C, C#dim, Dm, G7. It's often changed by changing Dm to D to give the progression a little bit more spark. However, it's also fairly common to change the C#dim to Cdim. I am a bit surprised about how similar they sound in context. Changing a whole chord half a step usually have a pretty dramatic impact on a chord progression, but here it's more like just adding a 7 or something.
Is there any theory behind this? And how should I reason about which I should pick, apart from the obvious "what sounds best".
I wanted to describe the above progression with function notation, but I thought I'd just mess it up. Please tell me how to write it properly. I know it should be something like I, X, ii, V7 but what should X be?
As requested in comments, here are four samples to show how little impact it has:

C, Cdim, Dm, G7
C, Cdim, D, G7
C, C#dim, Dm, G7
C, C#dim, D, G7 

A:

The similarity is likely due to the fact that both can be heard as passing diminished chords formed by chromatic voice leading. The C#dim is formed from an upward motion (C - C# - D), while the Cdim is formed from two downward motions (E - Eb - D; G - Gb - F).
As the other answerers have noted, the C#dim also has a functional interpretation (as an incomplete dominant). The use of one and the same sonority as a functional chord and a by-product of voice leading is a unifying technique used in many great works (e.g. the Tristan chord).

