1. A data processing apparatus comprising: an input unit configured to input document data; a character recognition unit configured to perform, on the document data input by the input unit, character recognition using a specified language; a document name setting unit configured to set, as at least part of a document name of the document data input by the input unit, a character string recognized by the character recognition unit; a display unit configured to display, on an operation unit, the document name set by the document name setting unit; and a control unit configured to restrain the display unit from displaying the document name including the character string set by the document name setting unit, when a character encoding scheme specified in a case where character recognition is performed by the character recognition unit is a character encoding scheme incompatible with a character encoding scheme of a language that is set in a language setting in the operation unit.