ucum icon indicating copy to clipboard operation
ucum copied to clipboard

Request for Chinese characters and the like in Annotation strings

Open linforestzhang opened this issue 1 year ago • 0 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: https://github.com/lhncbc/ucum-lhc/issues/49

Maybe this should be submitted as a proposal for the UCUM Specification per se.

Tkanks

linforestzhang avatar Jan 06 '24 00:01 linforestzhang