Task #10288 (new)
Opened 12 years ago
Last modified 11 years ago
Address literal non-ASCII characters in source code
Reported by: | mtbcarroll | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Unscheduled |
Component: | General | Version: | n.a. |
Keywords: | n.a. | Cc: | jburel, jamoore, rleigh, spli |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
https://github.com/manics/openmicroscopy/commit/4af0f14b90b5f35f0108c04978a65d66e918d9f2 and https://github.com/mtbc/openmicroscopy/commit/7b77a7447eb4aa0be58f41cef88075de205e4cb7 fix some fancy characters in Java source with some Unicode escaping.
Perhaps this should be done more comprehensively in the codebase and added to notes on coding style. It's easy to get encoding of directly typed characters wrong with things like MacRoman? floating around and different editors and viewers giving quite different views of the same characters. (Or perhaps some other tack should be taken, but also in a consistent and documented way.)
Change History (5)
comment:1 Changed 12 years ago by mtbcarroll
comment:2 Changed 12 years ago by mtbcarroll
Or, if we just type Unicode characters directly, make sure developers get proper guidance on what system and application settings will set the correct encoding.
comment:3 Changed 12 years ago by mtbcarroll
- Cc spli added
So, when our build system invokes javac, is it adding an -encoding UTF-8 option? If not, should it?
comment:4 Changed 12 years ago by mtbcarroll
Added https://github.com/openmicroscopy/openmicroscopy/pull/721 to adjust Insight code to include Unicode text, which at least makes it obvious that the symbols are the correct ones. BioFormats uses escaped Unicode in WriteUTFTest; I don't know if LOCI have their own separate policy about this kind of thing.
comment:5 Changed 11 years ago by mtbcarroll
- Cc rleigh added
Following https://github.com/openmicroscopy/openmicroscopy/pull/904 outstanding issues arising from discussion in today's standup include,
- the question of replacing copyright symbol text in file headers with a literal Unicode copyright character, to assist in noticing when file encodings get messed up
- adding guidance for C++ users, including any necessary MSVC command line switches.
Also note discussion in https://github.com/openmicroscopy/openmicroscopy/pull/690