Two Definitions of "Character" of topological groups When I first met the concept of "characters" of topological groups in Pontryagin's book "Topological groups", it was defined as follows:

Let $G$ be a topological group. A character of $G$ is a homomorphism of topological groups from $G$ to the torus $T=\mathbb{R}/\mathbb{Z}$. Here, the torus $T$ has the induced topology from the usual topology of the real line $\mathbb{R}$.

I found the same definition on Wikipedia. So, I think this is a standard definition of character. But, in a lot of modern articles, it seems to me that characters are defined as follows:

Let $G$ be a topological group. A character of $G$ is a homomorphism of topological groups from $G$ to the discrete additive group $\mathbb{Q}/\mathbb{Z}$.

Clearly, these two definitions cannot be the same for all topological groups. However, if $G$ is a (discrete) finite group, then the two definitions agree.
Questions:

*

*What kind of conditions on a topological group $G$ one needs in order to identify the two definitions of character?


*If $G$ is a "profinite group", then do the two definitions agree? If the answer is yes, then how can one prove it?
Please give me any advice.
Later
I found a way to answer the second question. One only needs to show the following: for any profinite group $G$ and any continuous homomorphism $f:G \to T$, the image of $f$ is finite. This statement can be shown as follows. The torus $T$ has an open neighborhood $U$ of $0$ which contains no non-trivial subgroup of $T$. Since $G$ is profinite, there exists an open normal subgroup $H$ of $G$ satisfying $H \subset f^{-1}(U)$. This implies $H \subset \ker(f)$. So, the map $f$ factors through the finite group $G/H$. This implies that the image of $f$ is finite.
Hence the two definitions of character agree for any profinite group.
 A: It is easy to miss the point  that in the second definition $\mathbb Q/\mathbb Z$ is required  to be discrete in  Hiro's question.
Hence even if a  continuous morphism $f:G\to T$ has image in $\mathbb Q/\mathbb Z$ it cannot automatically be considered as a continuous map $f_0:G\to \mathbb Q/\mathbb Z$  and so might not be a character in the second sense.  
An example for this failure is to take $G=T_{tors} =\mathbb Q/\mathbb Z\subset T$ , the torsion subgroup of $T$ with its induced topology from the circle and for the character $f $  (in the first sense) the inclusion $f:G\hookrightarrow T$.
Even though $G$ is torsion, the corestricted morphism $f_0:G\to \mathbb Q/\mathbb Z$ is not a character in the second sense, since it is not continuous.   
However if a character on  a compact group $G$  happens  to have values  in $\mathbb Q/\mathbb Z$,so that both definitions can be compared,  then its image  in the circle is finite and the two concepts coincide.
Xandi explains in his answer  that this is always the case for profinite groups.
A: I am assuming all groups we are talking about are locally compact and commutative.
The two definitions indeed do ageree on profinite groups. To prove it, you have to check that the functors $Hom(-,\mathbb Q/ \mathbb Z)$ and $Hom(-,\mathbb R/ \mathbb Z)$ both transform limits of compact groups into colimits of discrete groups. That's routine.
The two definitions also agree on discrete torsion groups, hence on all groups which contain a closed and open profinite subgroup such that the quotient is torsion. I guess that this is exactly the class of groups on which the two definitions agree.
