.
 *
 * If @a translated_to_utf8 is not @c NULL, then set @a *translated_to_utf8
 * to @c TRUE if at least one character of @a value in the source character
 * encoding was translated to UTF-8, or to @c FALSE otherwise.
 *
 * If @a translated_line_endings is not @c NULL, then set @a
 * *translated_line_endings to @c TRUE if at least one line ending was
 * changed to LF, or to @c FALSE otherwise.
 *
 * If @a value has an inconsistent line ending style, then: if @a repair
 * is @c FALSE, return @c SVN_ERR_IO_INCONSISTENT_EOL, else if @a repair is
 * @c TRUE, convert any line ending in @a value to "\n" in
 * @a *new_value.  Recognized line endings are: "\n", "\r", and "\r\n".
 *
 * Set @a *new_value to the translated string, allocated in @a result_pool.
 *
 * @a scratch_pool is used for temporary allocations.
 *
 * @since New in 1.7.
 */
svn_error_t *
svn_subst_translate_string2(svn_string_t **new_value,
                            svn_boolean_t *translated_to_utf8,
                            svn_boolean_t *translated_line_endings,
                            const svn_string_t *value,
                            const char *encoding,
                            svn_boolean_t repair,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);

/** Similar to svn_subst_translate_string2(), except that the information about
 * whether re-encoding or line ending translation were performed is discarded.
 *
 * @deprecated Provided for backward compatibility with the 1.6 API.
 */
SVN_DEPRECATED
svn_error_t *svn_subst_translate_string(svn_string_t **new_value,
                                        const svn_string_t *value,
                                        const char *encoding,
                                        apr_pool_t *pool);

/** Translate the string @a value from UTF8 and LF line-endings into native
 * character encoding and native line-endings.  If @a for_output is TRUE,
 * translate to the character encoding of the output locale, else to that of
 * the default locale.
 *
 * Set @a *new_value to the translated string, allocated in @a pool.
 */
svn_error_t *svn_subst_detranslate_string(svn_string_t **new_value,
                                          const svn_string_t *value,
                                          svn_boolean_t for_output,
                                          apr_pool_t *pool);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* SVN_SUBST_H */
