ITK icon indicating copy to clipboard operation
ITK copied to clipboard

Does Style allow Non-ASCII characters in Doxygen Comments

Open blowekamp opened this issue 2 years ago • 4 comments

In processing the Doxygen, a few UTF-8 characters where detected and required special handling on with one system configuration. Are non-ASCII character allows for ITK style?

$ grep --color='auto' -P -n "[^\x00-\x7F]" $(find . -name *.h) ./Core/Common/include/itkPromoteType.h:132: * «arithmetic operators do not accept types smaller than int as ./Core/Common/include/itkPromoteType.h:133: * arguments», that's why \c ITK_ASSOCIATE() is not used with \c char ./Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h:81: * G. Farnebäck & C.-F. Westin, "Improving Deriche-style Recursive Gaussian ./Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h:82: * Filters". J Math Imaging Vis 26, 293–299 (2006). ./Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h:44: * G. Farnebäck & C.-F. Westin, "Improving Deriche-style Recursive Gaussian ./Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h:45: * Filters". J Math Imaging Vis 26, 293–299 (2006). ./Remote/Montage/include/itkPhaseCorrelationOptimizer.h:111: * \author Dženan Zukić, [email protected], Kitware, Inc ./Remote/Montage/include/itkTileMergeImageFilter.h:42: * \author Dženan Zukić, [email protected] ./Remote/Montage/include/itkTileMontage.h:38: * \author Dženan Zukić, [email protected]

blowekamp avatar Aug 12 '22 14:08 blowekamp

I don't think there was discussion about it. It is preferable to support Unicode characters, of course. If that is hard, we can get rid of those 10 occurrences: « and » could be replaced by the usual quotation marks, Farnebäck could be written as Farnebaeck, and the whole * \author Dženan Zukić line could be removed as the authorship is tracked by the versioning system.

dzenanz avatar Aug 12 '22 15:08 dzenanz

Ideally we can support UTF-8. What was the issue encountered?

thewtex avatar Aug 16 '22 17:08 thewtex

I initially encountered an error processing the Doxygen XML files with python, but that was able to resolved by specifying file encodings in a couple places. Currently there is an issue with the Java compilation:

https://open.cdash.org/viewBuildError.php?buildid=8102095

org/itk/simple/RecursiveGaussianImageFilter.java:28: error: unmappable character (0xC3) for encoding US-ASCII Further improvements of the algorithm are described in: G. Farneb??ck

blowekamp avatar Aug 16 '22 17:08 blowekamp

Java should support Unicode: http://xahlee.info/java-a-day/unicode_in_java.html https://stackoverflow.com/questions/4448180/why-does-java-permit-escaped-unicode-characters-in-the-source-code

dzenanz avatar Aug 16 '22 20:08 dzenanz