Request for Chinese characters and the like in Annotation strings
linforestzhang opened this issue · comments
In the file unitString.js the ucum-lhc project:
// A regular expression for validating annotation strings.
static VALID_ANNOTATION_REGEX = /^{[!-z|~]*}$/;
It reminds me of the following proposal:
Annotation strings should be allowed to contain Chinese characters and like, such as:
{片} ... for {tablet}
Proposed regular expression:
// A regular expression for validating annotation strings.
static VALID_ANNOTATION_REGEX = /^{[!-z|~\u4e00-\u9fa5]*}$/;
Validated examples:
{片} ... for {tablet}
{肌酐} for {creat} [ Usage: nmol/mmol{肌酐} ... for nmol/mmol{creat} ]
{蛋白质} for {prot} [ Usage: nmol/mg{蛋白质} ... nmol/mg{prot} ]
...
The proposal above was initially submitted to the ucum-lhc project. See here:
lhncbc/ucum-lhc#49
Maybe this should be submitted as a proposal for the UCUM Specification per se.
Tkanks