A current procedure that takes into account the Dirichlet boundary conditionwith non-smooth data is to change it into aRobin type condition by introducing a penalization term; a major effect of thisprocedure is an easy implementation of the boundary condition. In this work, we deal with an optimal control problem wherethe control variable is the Dirichlet data.We describe the Robin penalization,and we bound the gap between the penalized and the non-penalized boundary controlsfor the small penalization parameter. Some numerical results are reported on to highlightthe reliability of such an approach.